Skip to content

Commit

Permalink
Breaking: Upgrade to Sveltekit 2 (#5)
Browse files Browse the repository at this point in the history
Update dependencies to SvelteKit 2. Node 16 is no longer supported.
  • Loading branch information
H0R5E authored May 15, 2024
1 parent 7d3397b commit 73fc994
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 44 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,24 @@ on:
jobs:
release:
name: Release (${{ github.event.workflow_run.head_commit.id }})
if: ${{ github.ref_name == 'main' && github.event.workflow_run.conclusion == 'success' }}
if: ${{ github.ref_name == 'main' && github.event.workflow_run.conclusion == 'success' && github.repository_owner == 'Data-Only-Greater'}}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
registry-url: 'https://registry.npmjs.org'
- name: Install package dependencies
run: yarn install
run: npm install
- name: Build package
run: yarn run build
run: npm run build
- name: Install semantic release
run: yarn add -D semantic-release @semantic-release/changelog @semantic-release/git conventional-changelog-conventionalcommits
run: npm install -D semantic-release @semantic-release/changelog @semantic-release/git conventional-changelog-conventionalcommits
- name: Semantic Release
run: npx semantic-release
env:
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,30 @@ jobs:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest]
node-version: [16, 18]
node-version: [18, 20]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: yarn install
run: npm install
- name: Test
run: yarn run test run --reporter verbose
run: npm run test -- run --reporter verbose
coverage:
needs: 'test'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
- name: Install dependencies
run: yarn install
run: npm install
- name: Generate coverage report
run: yarn run coverage
run: npm run coverage
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v3
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
node_modules
dist
coverage
yarn.lock
package-lock.json
!release.config.js
!lambda/*.js
45 changes: 24 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"types": "./index.d.ts",
"scripts": {
"build": "yarn clean && tsc --project tsconfig.build.json && yarn copy-files",
"build": "npm run clean && tsc --project tsconfig.build.json && npm run copy-files",
"build:doc": "jsdoc2md --files index.ts --configure ./jsdoc2md.json > index.md",
"clean": "rimraf dist/",
"copy-files": "copyfiles lambda/** package.json README.md LICENSE dist",
Expand All @@ -37,32 +37,35 @@
"coverage": "vitest run --coverage"
},
"devDependencies": {
"@aws-sdk/credential-provider-node": "^3.309.0",
"@aws-sdk/protocol-http": "^3.306.0",
"@aws-sdk/signature-v4": "^3.306.0",
"@babel/cli": "^7.21.0",
"@babel/core": "^7.21.3",
"@babel/preset-env": "^7.20.2",
"@babel/preset-typescript": "^7.21.0",
"@sveltejs/kit": "^1.15.2",
"@types/fs-extra": "^11.0.1",
"@vitest/coverage-c8": "^0.29.7",
"@aws-sdk/credential-provider-node": "^3.576.0",
"@babel/cli": "^7.24.5",
"@babel/core": "^7.24.5",
"@babel/preset-env": "^7.24.5",
"@babel/preset-typescript": "^7.24.1",
"@smithy/protocol-http": "^4.0.0",
"@smithy/signature-v4": "^3.0.0",
"@sveltejs/kit": "^2.5.8",
"@types/fs-extra": "^11.0.4",
"@vitest/coverage-v8": "^1.6.0",
"copyfiles": "^2.4.1",
"jsdoc-babel": "^0.5.0",
"jsdoc-to-markdown": "^8.0.0",
"prettier": "^2.8.4",
"rimraf": "^4.4.1",
"typescript": "^5.0.2",
"vitest": "^0.29.7"
"jsdoc-to-markdown": "^8.0.1",
"prettier": "^3.2.5",
"rimraf": "^5.0.7",
"typescript": "^5.4.5",
"vitest": "^1.6.0"
},
"dependencies": {
"@aws-crypto/sha256-js": "^4.0.0",
"esbuild": "^0.17.10",
"fs-extra": "^11.1.1",
"set-cookie-parser": "^2.5.1"
"@aws-crypto/sha256-js": "^5.2.0",
"esbuild": "^0.21.2",
"fs-extra": "^11.2.0",
"set-cookie-parser": "^2.6.0"
},
"engines": {
"node": ">=18.13"
},
"peerDependencies": {
"@sveltejs/kit": "^1.15.2"
"@sveltejs/kit": "^2.5.8"
},
"release": {
"branches": [
Expand Down
6 changes: 3 additions & 3 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"compilerOptions": {
"module": "es2022",
"module": "nodenext",
"target": "es2022",
"moduleResolution": "node",
"moduleResolution": "nodenext",
"declaration": true,
"strict": true,
"noImplicitAny": true,
Expand All @@ -20,7 +20,7 @@
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"allowJs": false,
"typeRoots": ["./node_modules/@types"],
"typeRoots": ["./node_modules/@types", "./node_modules"],
"types": ["vitest/globals"],
"outDir": "dist"
},
Expand Down
6 changes: 3 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"compilerOptions": {
"module": "es2022",
"module": "nodenext",
"target": "es2022",
"moduleResolution": "node",
"moduleResolution": "nodenext",
"declaration": true,
"strict": true,
"noImplicitAny": true,
Expand All @@ -20,7 +20,7 @@
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"allowJs": false,
"typeRoots": ["./node_modules/@types"],
"typeRoots": ["./node_modules/@types/", "./node_modules"],
"types": ["vitest/globals"]
},
"exclude": ["vitest.config.ts", "dist"]
Expand Down

0 comments on commit 73fc994

Please sign in to comment.