Skip to content

Commit 16deaed

Browse files
Hugos68abdel-17endigo9740
authored
Version packages (#30)
* 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 <[email protected]> Co-authored-by: Chris Simmons <[email protected]>
1 parent 056480f commit 16deaed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+8037
-1596
lines changed

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "restricted",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
.DS_Store
22
node_modules
33
/build
4+
/dist
45
/.svelte-kit
56
/package
67
.env
78
.env.*
89
!.env.example
10+
/coverage
911

1012
# Ignore files for PNPM, NPM and YARN
1113
pnpm-lock.yaml

.github/workflows/ci.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
6+
env:
7+
node_version: 20
8+
pnpm_version: 8
9+
10+
jobs:
11+
lint:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: pnpm/action-setup@v3
16+
with:
17+
version: ${{ env.pnpm_version }}
18+
- name: Use Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: ${{ env.node_version }}
22+
cache: 'pnpm'
23+
- name: Install dependencies
24+
run: pnpm install
25+
- name: Run linter
26+
run: pnpm lint
27+
check:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v4
31+
- uses: pnpm/action-setup@v3
32+
with:
33+
version: ${{ env.pnpm_version }}
34+
- name: Use Node.js
35+
uses: actions/setup-node@v4
36+
with:
37+
node-version: ${{ env.node_version }}
38+
cache: 'pnpm'
39+
- name: Install dependencies
40+
run: pnpm install
41+
- name: Run check
42+
run: pnpm check
43+
test:
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v4
47+
- uses: pnpm/action-setup@v3
48+
with:
49+
version: ${{ env.pnpm_version }}
50+
- name: Use Node.js
51+
uses: actions/setup-node@v4
52+
with:
53+
node-version: ${{ env.node_version }}
54+
cache: 'pnpm'
55+
- name: Install dependencies
56+
run: pnpm install
57+
- name: Run tests
58+
run: pnpm test
59+
build-docs:
60+
runs-on: ubuntu-latest
61+
steps:
62+
- uses: actions/checkout@v4
63+
- uses: pnpm/action-setup@v3
64+
with:
65+
version: ${{ env.pnpm_version }}
66+
- name: Use Node.js
67+
uses: actions/setup-node@v4
68+
with:
69+
node-version: ${{ env.node_version }}
70+
cache: 'pnpm'
71+
- name: Install dependencies
72+
run: pnpm install
73+
- name: Sync sveltekit
74+
run: pnpm check
75+
- name: Build docs
76+
run: pnpm build:docs
77+
build-package:
78+
runs-on: ubuntu-latest
79+
steps:
80+
- uses: actions/checkout@v4
81+
- uses: pnpm/action-setup@v3
82+
with:
83+
version: ${{ env.pnpm_version }}
84+
- name: Use Node.js
85+
uses: actions/setup-node@v4
86+
with:
87+
node-version: ${{ env.node_version }}
88+
cache: 'pnpm'
89+
- name: Install dependencies
90+
run: pnpm install
91+
- name: Sync sveltekit
92+
run: pnpm check
93+
- name: Build package
94+
run: pnpm build:package

.github/workflows/release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency: ${{ github.workflow }}-${{ github.ref }}
9+
10+
env:
11+
node_version: 20
12+
pnpm_version: 8
13+
14+
jobs:
15+
release:
16+
name: Release
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: pnpm/action-setup@v3
21+
with:
22+
version: ${{ env.pnpm_version }}
23+
- name: Use Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: ${{ env.node_version }}
27+
cache: 'pnpm'
28+
29+
- name: Install dependencies
30+
run: pnpm install
31+
32+
- name: Create Release Pull Request or Publish to npm
33+
id: changesets
34+
uses: changesets/action@v1
35+
with:
36+
publish: pnpm ci:publish
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ node_modules
99
!.env.example
1010
vite.config.js.timestamp-*
1111
vite.config.ts.timestamp-*
12+
/coverage

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
pnpm-lock.yaml
33
package-lock.json
44
yarn.lock
5+
/coverage

.prettierrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"singleQuote": true,
44
"trailingComma": "none",
55
"printWidth": 100,
6-
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
6+
"plugins": ["prettier-plugin-svelte"],
77
"overrides": [
88
{
99
"files": "*.svelte",

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024-PRESENT Skeleton Labs, LLC
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

package.json

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
{
2-
"name": "floating-ui-svelte",
3-
"version": "0.0.1",
2+
"name": "@skeletonlabs/floating-ui-svelte",
3+
"version": "0.0.0",
4+
"license": "MIT",
45
"scripts": {
56
"dev": "vite dev",
6-
"build": "vite build && npm run package",
77
"preview": "vite preview",
8-
"package": "svelte-kit sync && svelte-package && publint",
9-
"prepublishOnly": "npm run package",
10-
"test": "npm run test:integration && npm run test:unit",
11-
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
12-
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
13-
"lint": "prettier --check . && eslint .",
8+
"build": "pnpm build:docs && pnpm build:package",
9+
"build:docs": "svelte-kit sync && vite build",
10+
"build:package": "svelte-kit sync && svelte-package && publint",
11+
"ci:publish": "pnpm build:package && changeset publish",
12+
"publish": "pnpm build:package && changeset publish",
13+
"test": "vitest run --coverage",
14+
"test:watch": "vitest run --coverage --watch",
1415
"format": "prettier --write .",
15-
"test:integration": "playwright test",
16-
"test:unit": "vitest"
16+
"lint": "prettier --check . && eslint .",
17+
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json"
1718
},
1819
"exports": {
1920
".": {
@@ -26,29 +27,36 @@
2627
"!dist/**/*.test.*",
2728
"!dist/**/*.spec.*"
2829
],
30+
"dependencies": {
31+
"@floating-ui/dom": "^1.6.3"
32+
},
2933
"peerDependencies": {
3034
"svelte": "^5.0.0-next.1"
3135
},
3236
"devDependencies": {
33-
"@playwright/test": "^1.28.1",
34-
"@sveltejs/adapter-auto": "^3.0.0",
37+
"@changesets/cli": "^2.27.1",
38+
"@sveltejs/adapter-static": "^3.0.1",
3539
"@sveltejs/kit": "^2.0.0",
3640
"@sveltejs/package": "^2.0.0",
3741
"@sveltejs/vite-plugin-svelte": "^3.0.0",
42+
"@testing-library/jest-dom": "^6.4.2",
3843
"@types/eslint": "^8.56.0",
3944
"@typescript-eslint/eslint-plugin": "^7.0.0",
4045
"@typescript-eslint/parser": "^7.0.0",
46+
"@vitest/coverage-v8": "^1.5.2",
4147
"autoprefixer": "^10.4.16",
4248
"eslint": "^8.56.0",
4349
"eslint-config-prettier": "^9.1.0",
4450
"eslint-plugin-svelte": "^2.36.0-next.4",
51+
"jsdom": "^24.0.0",
52+
"lucide-svelte": "^0.373.0",
4553
"postcss": "^8.4.32",
4654
"postcss-load-config": "^5.0.2",
4755
"prettier": "^3.1.1",
4856
"prettier-plugin-svelte": "^3.1.2",
49-
"prettier-plugin-tailwindcss": "^0.5.9",
5057
"publint": "^0.1.9",
51-
"svelte": "^5.0.0-next.1",
58+
"shiki": "^1.3.0",
59+
"svelte": "5.0.0-next.115",
5260
"svelte-check": "^3.6.0",
5361
"tailwindcss": "^3.3.6",
5462
"tslib": "^2.4.1",

0 commit comments

Comments
 (0)