-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
chore: setup changesets #8668
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
Merged
Merged
chore: setup changesets #8668
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
25bb1a6
chore: setup changesets
benmccann 567b7a3
address feedback
benmccann 39c432e
use node lts
benmccann 24989ad
add release script
benmccann bcb0a30
generate version
benmccann b2c53fa
add space
benmccann 0fc25ce
pnpm changeset -> changeset
benmccann 0298a2d
separate out version generation
benmccann 3e43950
revert lockfile changes
benmccann 4ce96c1
expand comment
benmccann c97df16
rename version script
benmccann fa805bd
update git cli flag
benmccann 7a4823a
Merge branch 'version-4' into changesets
benmccann 9891117
semicolon
benmccann 59fbfa8
space
benmccann 290ddfb
format changelog
benmccann 2e0cc3d
add version.js to git
benmccann 9cd2564
chore: add test to ensure version.js and package.json are in sync
dominikg d82a216
Merge pull request #3 from dominikg/version-test
benmccann da1bfd7
Update .changeset/config.json
benmccann 5a6280b
Merge branch 'version-4' into changesets
benmccann ef8db22
Update packages/svelte/test/version/version.test.js
benmccann File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Changesets | ||
|
||
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works | ||
with multi-package repos, or single-package repos to help you version and publish your code. You can | ||
find the full documentation for it [in our repository](https://github.com/changesets/changesets) | ||
|
||
We have a quick list of common questions to get you started engaging with this project in | ||
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json", | ||
"changelog": ["@svitejs/changesets-changelog-github-compact", { "repo": "sveltejs/svelte" }], | ||
"commit": false, | ||
"fixed": [], | ||
"linked": [], | ||
"access": "public", | ||
"baseBranch": "version-4", | ||
"bumpVersionsWithWorkspaceProtocolOnly": true, | ||
"ignore": ["!(@sveltejs/*|svelte)"] | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"mode": "pre", | ||
"tag": "next", | ||
"initialVersions": { | ||
"svelte": "4.0.0-next.1" | ||
}, | ||
"changesets": [] | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- version-4 | ||
|
||
permissions: {} | ||
jobs: | ||
release: | ||
# prevents this action from running on forks | ||
if: github.repository == 'sveltejs/svelte' | ||
permissions: | ||
contents: write # to create release (changesets/action) | ||
pull-requests: write # to create pull request (changesets/action) | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
with: | ||
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits | ||
fetch-depth: 0 | ||
- uses: pnpm/action-setup@v2.2.4 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
cache: pnpm | ||
|
||
- run: pnpm install --frozen-lockfile | ||
|
||
- name: Create Release Pull Request or Publish to npm | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
version: pnpm changeset:version | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
*.map | ||
/src/compiler/compile/internal_exports.js | ||
/src/shared/version.js | ||
/compiler.d.ts | ||
/compiler.cjs | ||
/index.d.ts | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import fs from 'node:fs'; | ||
|
||
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf-8')); | ||
|
||
fs.writeFileSync( | ||
'./src/shared/version.js', | ||
`// generated during release, do not modify\n\n/** @type {string} */\nexport const VERSION = '${pkg.version}';\n` | ||
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// generated during release, do not modify | ||
|
||
/** @type {string} */ | ||
export const VERSION = '4.0.0-next.0'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { fileURLToPath } from 'node:url'; | ||
import { assert, describe, it } from 'vitest'; | ||
import { VERSION } from 'svelte/compiler'; | ||
import { try_load_json } from '../helpers.js'; | ||
|
||
describe('svelte/compiler VERSION', () => { | ||
it('should be the exact version from package.json'); | ||
const pkg = try_load_json( | ||
fileURLToPath(new URL('../../../../packages/svelte/package.json', import.meta.url)) | ||
); | ||
assert.equal( | ||
VERSION, | ||
pkg.version, | ||
'VERSION export in src/shared/version.js does not equal version in package.json' | ||
); | ||
}); |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.