Skip to content
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
9 changes: 8 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,11 @@ jobs:
with:
node-version: 18
cache: pnpm
- run: 'pnpm i && pnpm check && pnpm lint'
- name: install
run: pnpm install --frozen-lockfile
- name: type check
run: pnpm check
- name: lint
run: pnpm lint
- name: build and check generated types
run: pnpm build && { [ "`git status --porcelain=v1`" == "" ] || (echo "Generated types have changed — please regenerate types locally and commit the changes after you have reviewed them"; git diff; exit 1); }
6 changes: 5 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ jobs:
node-version: 18.x
cache: pnpm

- run: pnpm install --frozen-lockfile
- name: Install
run: pnpm install --frozen-lockfile

- name: Build
run: pnpm build && { [ "`git status --porcelain=v1`" == "" ] || (echo "Generated types have changed — please regenerate types locally and commit the changes after you have reviewed them"; git diff; exit 1); }

- name: Create Release Pull Request or Publish to npm
id: changesets
Expand Down
6 changes: 5 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ To typecheck the codebase, run `pnpm check` inside `packages/svelte`. To typeche
- `snake_case` for internal variable names and methods.
- `camelCase` for public variable names and methods.

### Generating types

Types are auto-generated from the source, but the result is checked in to ensure no accidental changes slip through. Run `pnpm generate:types` to regenerate the types.

### Sending your pull request

Please make sure the following is done when submitting a pull request:
Expand All @@ -141,7 +145,7 @@ Please make sure the following is done when submitting a pull request:
1. Make sure your code lints (`pnpm lint`).
1. Make sure your tests pass (`pnpm test`).

All pull requests should be opened against the `main` branch. Make sure the PR does only one thing, otherwise please split it.
All pull requests should be opened against the `main` branch. Make sure the PR does only one thing, otherwise please split it. If this change should contribute to a version bump, run `npx changeset` at the root of the repository after a code change and select the appropriate packages.

#### Breaking changes

Expand Down
3 changes: 2 additions & 1 deletion packages/svelte/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/types
/types/*.map
/types/compiler
/compiler.cjs

/action.d.ts
Expand Down
5 changes: 3 additions & 2 deletions packages/svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,12 @@
"templating"
],
"scripts": {
"build": "rollup -c && node scripts/build.js && node scripts/check-treeshakeability.js",
"build": "rollup -c && pnpm generate:types && node scripts/check-treeshakeability.js",
"dev": "rollup -cw",
"check": "tsc && cd ./tests/types && tsc",
"check:watch": "tsc --watch",
"generate:version": "node ./scripts/generate-version.js",
"generate:types": "node ./scripts/generate-types.js",
"prepublishOnly": "pnpm build"
},
"devDependencies": {
Expand All @@ -106,7 +107,7 @@
"@rollup/plugin-virtual": "^3.0.2",
"@types/aria-query": "^5.0.3",
"@types/estree": "^1.0.5",
"dts-buddy": "^0.4.0",
"dts-buddy": "^0.4.3",
"esbuild": "^0.19.2",
"rollup": "^4.1.5",
"source-map": "^0.7.4",
Expand Down
Loading