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

v0.2 wip #72

Merged
merged 35 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
9133a70
remove old playgrounds
rixo May 30, 2023
6b20358
WIP migrate tests to vitest, & general cleanup
rixo Jun 27, 2023
8072bb1
pnpm audit --fix
rixo Jun 27, 2023
81812c1
fix playwright in CI
rixo Jun 27, 2023
d27cb18
ci: remove node 14, add 18
rixo Jun 27, 2023
c46e3f3
WIP continue migrating tests
rixo Jun 27, 2023
37a96ae
enlarge test timeouts
rixo Jun 27, 2023
05b3a94
WIP continue migrating tests
rixo Jul 11, 2023
dbc5dcb
upgrade deps to fix vulnerabilities
rixo Jul 12, 2023
3ec2c92
remove forgotten only
rixo Jul 12, 2023
47bf13e
WIP finish migrating tests
rixo Jul 12, 2023
7ecf008
add back Node 14 to CI matrix for tests
rixo Jul 12, 2023
583a446
make sure we're stopping test properly on failure or crash
rixo Jul 12, 2023
73428d8
cleanup pnpm-lock.yaml
rixo Jul 12, 2023
dce2fd6
chore: copy CI matrix from vite-plugin-svelte, and adjust engines rules
rixo Jul 12, 2023
e941b0d
revert to previous engines.node
rixo Jul 12, 2023
8e7627b
remove unused dependency
rixo Jul 12, 2023
81436bc
prove that CI tests are working by introducing a failure
rixo Jul 12, 2023
59f3e36
revert change intended to exercice CI tests
rixo Jul 12, 2023
6a71913
merge master
benmccann Aug 5, 2023
19f0b45
Update .gitignore
rixo Jan 6, 2024
a1efafd
fix comment in .gitignore
rixo Jan 6, 2024
3012d96
remove now unused peer dependencies rules
rixo Jan 6, 2024
2c7e7f2
fix security audit
rixo Jan 6, 2024
f58efae
change packageManager to pnpm 8
rixo Jan 6, 2024
d07ee27
upgrade vitest
rixo Jan 6, 2024
a718860
remove node 14 from test matrix
rixo Jan 6, 2024
4135915
Merge remote-tracking branch 'origin/master' into v0.2-wip
rixo Feb 13, 2024
aeee49f
fix audit
rixo Feb 13, 2024
d5b6abe
chore: upgrade github actions
benmccann Sep 10, 2024
b4964a6
upgrade to vite@5 and fix new audit alerts
rixo Sep 10, 2024
c19ce4c
Merge remote-tracking branch 'origin/github-actions' into v0.2-wip
rixo Sep 10, 2024
6d8f434
downgrade lockfile to pnpm 8
rixo Sep 10, 2024
6066493
add changeset
rixo Sep 10, 2024
e9cd948
remove overrides not needed anymore
rixo Sep 11, 2024
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
5 changes: 5 additions & 0 deletions .changeset/big-pugs-bake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'svelte-hmr': minor
---

Rewrite tests to get rid of old vulnerable (dev) dependencies, and update CI setup
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.ts
17 changes: 0 additions & 17 deletions .eslintrc

This file was deleted.

15 changes: 15 additions & 0 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
parserOptions:
sourceType: module
ecmaVersion: latest

# overrides:
# - files:
# - "packages/svelte-hmr/index.js"
# - "packages/svelte-hmr/lib/**/*"
# - "**/rollup.config.js"
# env:
# node: true

env:
node: true
# es2022: true
28 changes: 21 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
branches:
- master

env:
# we call `pnpm playwright install` instead
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'

jobs:
# "checks" job runs on linux + 16 only and checks that install, build, lint and audit work
# it also primes the pnpm store cache for linux, important for downstream tests
Expand All @@ -23,9 +27,9 @@ jobs:
outputs:
build_successful: ${{ steps.build.outcome == 'success' }}
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2.2.4
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'pnpm'
Expand Down Expand Up @@ -53,15 +57,25 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest ]
node: [ 14, 16 ]
node: [ 16, 18, 20, 22 ]
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2.2.4
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'pnpm'
- name: use svelte 3
if: matrix.svelte == 3
run: |
tmppkg="$(jq '.devDependencies.svelte = "^3.59.2"' package.json)" && echo -E "${tmppkg}" > package.json && tmppkg=""
- name: install
if: matrix.node != 14 && matrix.svelte != 3
run: pnpm install --frozen-lockfile --prefer-offline
- name: install for node14 or svelte3
if: matrix.node == 14 || matrix.svelte == 3
run: pnpm install --no-frozen-lockfile --prefer-offline
- name: install playwright chromium
run: cd playground && pnpm playwright install chromium
- name: run tests
run: pnpm test
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ jobs:
strategy:
matrix:
# pseudo-matrix for convenience, NEVER use more than a single combination
node: [16]
node: [20]
os: [ubuntu-latest]
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: install pnpm
Expand All @@ -31,7 +31,7 @@ jobs:
PNPM_VER=$(jq -r '.packageManager | if .[0:5] == "pnpm@" then .[5:] else "packageManager in package.json does not start with pnpm@\n" | halt_error(1) end' package.json)
echo installing pnpm version $PNPM_VER
npm i -g pnpm@$PNPM_VER
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'pnpm'
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,6 @@ pnpm-lock.yaml
*.bak.*
*.bak
*.orig

# temporary playground files
/playground-*/
rixo marked this conversation as resolved.
Show resolved Hide resolved
3 changes: 0 additions & 3 deletions .prettierrc

This file was deleted.

3 changes: 3 additions & 0 deletions packages/svelte-hmr-spec/.prettierrc → .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
plugins:
- prettier-plugin-jsdoc

semi: false
singleQuote: true
trailingComma: es5
14 changes: 14 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": "@tsconfig/svelte/tsconfig.json",
"include": ["packages/**/*", "playground/**/*"],
"exclude": ["node_modules", "**/*.bak"],
"compilerOptions": {
"checkJs": true,
"moduleResolution": "node16",
"module": "es2022",
"resolveJsonModule": true,
"skipLibCheck": true,
//"noUnusedLocals": true,
//"types": []
}
}
22 changes: 22 additions & 0 deletions mount-tmp-playground.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

# Mount a tmpfs on playground-tmp directory.
#
# This is entirely optional. The point is to save write cycles on your disk.
#
# Usage:
#
# export TMP_PLAYGROUND_DIR=playground-tmp
# ./mount-tmp-playground.sh
# cd playground
# pnpm test
#

TMP_PLAYGROUND_DIR=${TMP_PLAYGROUND_DIR:-"playground-tmp"}

if [ "$1" == "-u" ] || [ "$1" == "--unmount" ]; then
umount "$TMP_PLAYGROUND_DIR"
else
mkdir -p "$TMP_PLAYGROUND_DIR"
mount -o size=16G -t tmpfs none playground-tmp
fi
20 changes: 11 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,26 @@
"type": "git",
"url": "https://github.com/sveltejs/svelte-hmr"
},
"packageManager": "pnpm@7.33.5",
"packageManager": "pnpm@8.14.0",
"engines": {
"pnpm": ">=7.0.0"
},
"pnpm": {
"overrides": {
"minimatch@^3.0.4": "^3.1.2",
"svelte-hmr": "workspace:*"
},
"peerDependencyRules": {
"ignoreMissing": ["nollup","webpack","webpack-dev-server"]
"svelte-hmr": "workspace:*",
"svelte": "$svelte"
}
},
"devDependencies": {
"@changesets/cli": "^2.26.2",
"@rixo/eslint-config": "^0.8.1",
"@changesets/cli": "^2.27.8",
"@svitejs/changesets-changelog-github-compact": "^0.1.1",
"prettier": "^1.19.1"
"@tsconfig/svelte": "^4.0.1",
"eslint": "^8.44.0",
"prettier": "^2.8.8",
"prettier-plugin-jsdoc": "^0.4.2",
"svelte": "^4.0.0",
"svelte-check": "^3.4.4",
"typescript": "^5.0.4"
},
"scripts": {
"release": "pnpm changeset publish",
Expand Down
1 change: 0 additions & 1 deletion packages/svelte-hmr-spec/.eslintignore

This file was deleted.

22 changes: 0 additions & 22 deletions packages/svelte-hmr-spec/.eslintrc

This file was deleted.

4 changes: 0 additions & 4 deletions packages/svelte-hmr-spec/.gitignore

This file was deleted.

7 changes: 0 additions & 7 deletions packages/svelte-hmr-spec/.mocharc.yml

This file was deleted.

51 changes: 0 additions & 51 deletions packages/svelte-hmr-spec/README.md

This file was deleted.

9 changes: 0 additions & 9 deletions packages/svelte-hmr-spec/cli.js

This file was deleted.

30 changes: 0 additions & 30 deletions packages/svelte-hmr-spec/package.json

This file was deleted.

1 change: 0 additions & 1 deletion packages/svelte-hmr-spec/src.fixtures/App.svelte

This file was deleted.

9 changes: 0 additions & 9 deletions packages/svelte-hmr-spec/src.fixtures/main.js

This file was deleted.

Loading