Skip to content

Commit

Permalink
Version packages (#30)
Browse files Browse the repository at this point in the history
* useFloating hook

* Refinements

* comments cleanup and reactiveness

* Box module, example broke :(

* cleanup

* format lint

* improve useFloating

* update example

* fix file structure

* Added lint disable until context is built in

* Changed package name

* format

* Added exports

* Added context

* Removed boilerplate stuffs

* Added context

* Added .pre

* Initialized testing

* Removed inspects

* import

* test

* Resolved TODO

* Removed component for hook tests, added more test cases

* Updated tests to cover all reactive props.

* format && lint

* Website Design (#15)

* Basic page styles defined

* Layout and styles refined

* Add Lucide, refinement

* Update content and links

* Scrollbars

* Page title

* Drawer added, but broken

* Mobile drawer functional

* Nav drawer animation

* Update links

* Nav anchor drawer fix

* Stubbed placeholder pages

* Homepage placeholder

* Removed sandbox page

* Simplified internals. Added missing tests

* Nitpick

* Added middlewareData test

* format lint

* Added changesets, cleaned up packagejson

* Added CI and release job

* All branches target

* Run CI on pull request

* Fixed node version

* Fixed linting issues

* Divided into jobs

* Added FIXME with link to github

* Added sync command and run before builds

* Added sveltekit sync to both builds

* packagejson fix

* Moved versions into env to make it easier to change across the jobs

* Added LICENSE

* Stricter TSconfig

* Added coverage

* Added packageManager field, fixed incorrect type

* Add text (cmd output) coverage reporter

* Remove accidental coverage push

* Update pnpm to v9

* Remove format step from ci. (linting handles checks the format)

* Updated actions, fixed `publish` script clashing with `npm publish`

* Reverted pnpm version

* Fixed conflict

* Replaced raw pnpm version with variable

* Colocated tests

* Feat: Code highlighting for docs (#18)

* Added shiki

* Moved stores to `docs` module

* Resolved pnpm-lock conflict

* Fixed code block issues

* Better specificy, fixed @html warning

* Website now uses packagejson version (#29)

* moved to static adapter

---------

Co-authored-by: abdel-17 <abdelrahmanb015@gmail.com>
Co-authored-by: Chris Simmons <gundamx9740@gmail.com>
  • Loading branch information
3 people authored Apr 27, 2024
1 parent 056480f commit 16deaed
Show file tree
Hide file tree
Showing 42 changed files with 8,037 additions and 1,596 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
.DS_Store
node_modules
/build
/dist
/.svelte-kit
/package
.env
.env.*
!.env.example
/coverage

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
Expand Down
94 changes: 94 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: CI

on:
pull_request:

env:
node_version: 20
pnpm_version: 8

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: ${{ env.pnpm_version }}
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.node_version }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Run linter
run: pnpm lint
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: ${{ env.pnpm_version }}
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.node_version }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Run check
run: pnpm check
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: ${{ env.pnpm_version }}
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.node_version }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Run tests
run: pnpm test
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: ${{ env.pnpm_version }}
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.node_version }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Sync sveltekit
run: pnpm check
- name: Build docs
run: pnpm build:docs
build-package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: ${{ env.pnpm_version }}
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.node_version }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Sync sveltekit
run: pnpm check
- name: Build package
run: pnpm build:package
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Release

on:
push:
branches:
- main

concurrency: ${{ github.workflow }}-${{ github.ref }}

env:
node_version: 20
pnpm_version: 8

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: ${{ env.pnpm_version }}
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.node_version }}
cache: 'pnpm'

- name: Install dependencies
run: pnpm install

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: pnpm ci:publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ node_modules
!.env.example
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
/coverage
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
pnpm-lock.yaml
package-lock.json
yarn.lock
/coverage
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
"plugins": ["prettier-plugin-svelte"],
"overrides": [
{
"files": "*.svelte",
Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024-PRESENT Skeleton Labs, LLC

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
38 changes: 23 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
{
"name": "floating-ui-svelte",
"version": "0.0.1",
"name": "@skeletonlabs/floating-ui-svelte",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"dev": "vite dev",
"build": "vite build && npm run package",
"preview": "vite preview",
"package": "svelte-kit sync && svelte-package && publint",
"prepublishOnly": "npm run package",
"test": "npm run test:integration && npm run test:unit",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --check . && eslint .",
"build": "pnpm build:docs && pnpm build:package",
"build:docs": "svelte-kit sync && vite build",
"build:package": "svelte-kit sync && svelte-package && publint",
"ci:publish": "pnpm build:package && changeset publish",
"publish": "pnpm build:package && changeset publish",
"test": "vitest run --coverage",
"test:watch": "vitest run --coverage --watch",
"format": "prettier --write .",
"test:integration": "playwright test",
"test:unit": "vitest"
"lint": "prettier --check . && eslint .",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json"
},
"exports": {
".": {
Expand All @@ -26,29 +27,36 @@
"!dist/**/*.test.*",
"!dist/**/*.spec.*"
],
"dependencies": {
"@floating-ui/dom": "^1.6.3"
},
"peerDependencies": {
"svelte": "^5.0.0-next.1"
},
"devDependencies": {
"@playwright/test": "^1.28.1",
"@sveltejs/adapter-auto": "^3.0.0",
"@changesets/cli": "^2.27.1",
"@sveltejs/adapter-static": "^3.0.1",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/package": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"@testing-library/jest-dom": "^6.4.2",
"@types/eslint": "^8.56.0",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^7.0.0",
"@vitest/coverage-v8": "^1.5.2",
"autoprefixer": "^10.4.16",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.36.0-next.4",
"jsdom": "^24.0.0",
"lucide-svelte": "^0.373.0",
"postcss": "^8.4.32",
"postcss-load-config": "^5.0.2",
"prettier": "^3.1.1",
"prettier-plugin-svelte": "^3.1.2",
"prettier-plugin-tailwindcss": "^0.5.9",
"publint": "^0.1.9",
"svelte": "^5.0.0-next.1",
"shiki": "^1.3.0",
"svelte": "5.0.0-next.115",
"svelte-check": "^3.6.0",
"tailwindcss": "^3.3.6",
"tslib": "^2.4.1",
Expand Down
12 changes: 0 additions & 12 deletions playwright.config.ts

This file was deleted.

Loading

0 comments on commit 16deaed

Please sign in to comment.