Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade packages + tests + workflows #62

Merged
merged 1 commit into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/main-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4

- name: Get yarn cache directory path
id: yarn-cache-dir-path
Expand All @@ -34,7 +34,7 @@ jobs:
run: yarn svelte:build

- name: Deploy to Netlify
uses: nwtgck/actions-netlify@v1.2
uses: nwtgck/actions-netlify@v2.1
with:
publish-dir: './svelte/build'
production-branch: main
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4

- name: Get yarn cache directory path
id: yarn-cache-dir-path
Expand All @@ -37,7 +37,7 @@ jobs:
run: yarn svelte:build

- name: Deploy to Netlify
uses: nwtgck/actions-netlify@v1.2
uses: nwtgck/actions-netlify@v2.1
with:
publish-dir: './svelte/build'
production-branch: main
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/upgrade-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:

schedule:
- cron: "0 0 * * 0"
- cron: '0 0 * * 0'

jobs:
upgrade-packages:
Expand All @@ -14,20 +14,20 @@ jobs:

steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Node.js ⚙️
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: "18.x"
node-version: '18.x'

- name: Upgrade packages 🔀
run: yarn upgradeAndTest

- name: Commit and create PR 🔀
uses: peter-evans/create-pull-request@v3
uses: peter-evans/create-pull-request@v5
with:
title: "Upgrade Yarn packages (automated)"
branch: "upgrade-yarn-packages-automated"
commit-message: "Upgrade yarn packages (automated)"
title: 'Upgrade Yarn packages (automated)'
branch: 'upgrade-yarn-packages-automated'
commit-message: 'Upgrade yarn packages (automated)'
reviewers: aneuhold
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@
"license": "ISC",
"dependencies": {
"copyfiles": "^2.4.1",
"typescript": "^5.1.3"
"typescript": "^5.2.2"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.59.11",
"@typescript-eslint/parser": "^5.59.11",
"eslint": "^8.43.0",
"@typescript-eslint/eslint-plugin": "^6.7.3",
"@typescript-eslint/parser": "^6.7.3",
"eslint": "^8.50.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-react": "^7.32.2"
"eslint-plugin-react": "^7.33.2"
},
"devDependenciesNotes": {
"eslint-plugin-jsx-a11y": "This is needed for eslint-config-airbnb to work"
Expand Down
8 changes: 7 additions & 1 deletion svelte/jest.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,16 @@ module.exports = {
preprocess: true
}
],
'^.+\\.ts$': 'ts-jest',
'^.+\\.ts$': [
'ts-jest',
{
useESM: true
}
],
'^.+\\.js$': 'babel-jest'
},
moduleFileExtensions: ['js', 'ts', 'svelte'],
extensionsToTreatAsEsm: ['.svelte', '.ts'],
testEnvironment: 'jsdom',
modulePaths: ['<rootDir>'],
roots: ['<rootDir>'],
Expand Down
54 changes: 27 additions & 27 deletions svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,43 +12,43 @@
"check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --ignore-path .gitignore --check --plugin-search-dir=. . && eslint --ignore-path .gitignore .",
"format": "prettier --ignore-path .gitignore --write --plugin-search-dir=. .",
"test": "jest",
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
"buildAndTest": "yarn build && yarn test",
"upgradeAndTest": "yarn upgrade --latest && yarn buildAndTest"
},
"devDependencies": {
"@sveltejs/adapter-auto": "2.1.0",
"@sveltejs/kit": "1.20.4",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/svelte": "^3.2.2",
"@types/jest": "^29.5.2",
"@types/marked": "^5.0.0",
"@typescript-eslint/eslint-plugin": "^5.59.11",
"@typescript-eslint/parser": "^5.59.11",
"babel-jest": "^29.5.0",
"eslint": "^8.43.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^4.2.1",
"@sveltejs/kit": "1.25.1",
"@testing-library/jest-dom": "^6.1.3",
"@testing-library/svelte": "^4.0.3",
"@types/jest": "^29.5.5",
"@types/marked": "^5.0.2",
"@typescript-eslint/eslint-plugin": "^6.7.3",
"@typescript-eslint/parser": "^6.7.3",
"babel-jest": "^29.7.0",
"eslint": "^8.50.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-svelte3": "^4.0.0",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"prettier": "^2.8.8",
"prettier-plugin-svelte": "^2.10.1",
"sass": "^1.63.4",
"svelte": "^3.59.1",
"svelte-check": "^3.4.3",
"svelte-jester": "^2.3.2",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"prettier": "^3.0.3",
"prettier-plugin-svelte": "^3.0.3",
"sass": "^1.68.0",
"svelte": "^4.2.1",
"svelte-check": "^3.5.2",
"svelte-jester": "^3.0.0",
"svelte-preprocess": "^5.0.4",
"ts-jest": "^29.1.0",
"tslib": "^2.5.3",
"typescript": "~5.1.3",
"vite": "^4.3.9"
"ts-jest": "^29.1.1",
"tslib": "^2.6.2",
"typescript": "~5.2.2",
"vite": "^4.4.9"
},
"type": "module",
"dependencies": {
"@sveltejs/adapter-static": "^2.0.2",
"marked": "^5.1.0",
"mdsvex": "^0.10.6",
"@sveltejs/adapter-static": "^2.0.3",
"marked": "^9.0.3",
"mdsvex": "^0.11.0",
"node-sass": "^9.0.0"
}
}
8 changes: 4 additions & 4 deletions svelte/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
// - The jest.config.cjs file
// - The svelte.config.js resolve and server sections
"paths": {
"src/*": ["src/*"],
"src/*": ["./src/*"],
// The below were asked to be put there by Svelte-Kit for some reason.
"$lib": ["src/lib"],
"$lib/*": ["src/lib/*"],
"config/*": ["_shared-config/*"]
"$lib": ["./src/lib"],
"$lib/*": ["./src/lib/*"],
"config/*": ["./_shared-config/*"]
}
},
"include": [
Expand Down
Loading
Loading