mirror of https://github.com/sveltejs/svelte
parent
f74dddd1d5
commit
f2ff684b5f
@ -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)
|
@ -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)"]
|
||||||
|
}
|
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"mode": "pre",
|
||||||
|
"tag": "next",
|
||||||
|
"initialVersions": {
|
||||||
|
"svelte": "4.0.0-next.1"
|
||||||
|
},
|
||||||
|
"changesets": []
|
||||||
|
}
|
@ -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 }}
|
File diff suppressed because it is too large
Load Diff
@ -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`
|
||||||
|
);
|
@ -0,0 +1,4 @@
|
|||||||
|
// generated during release, do not modify
|
||||||
|
|
||||||
|
/** @type {string} */
|
||||||
|
export const VERSION = '4.0.0-next.0';
|
@ -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'
|
||||||
|
);
|
||||||
|
});
|
Loading…
Reference in new issue