merge version-4 branch

pull/8696/head
Ben McCann 2 years ago
commit 276d2f86ba

@ -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 }}

@ -9,7 +9,9 @@
"build": "pnpm -r build",
"check": "pnpm -r check",
"lint": "pnpm -r lint",
"format": "pnpm -r format"
"format": "pnpm -r format",
"changeset:version": "changeset version && pnpm -r generate:version && git add --all",
"release": "changeset release"
},
"repository": {
"type": "git",
@ -27,5 +29,5 @@
"prettier": "^2.8.8",
"prettier-plugin-svelte": "^2.10.0"
},
"packageManager": "pnpm@8.4.0"
"packageManager": "pnpm@8.6.0"
}

@ -1,6 +1,5 @@
*.map
/src/compiler/compile/internal_exports.js
/src/shared/version.js
/compiler.d.ts
/compiler.cjs
/index.d.ts

@ -15,6 +15,7 @@ sites/svelte.dev/.vercel
/test/**/_actual*
/test/**/expected*
/test/**/_output
/test/**/shards/*.test.js
/types
!rollup.config.js
!vitest.config.js

@ -13,7 +13,7 @@
- breaking: Minimum supported TypeScript version is now TypeScript 5 (it will likely work with lower versions, but we make no guarantees about that) ([#8488](https://github.com/sveltejs/svelte/pull/8488))
- breaking: Remove `svelte/register` hook, CJS runtime version and CJS compiler output ([#8613](https://github.com/sveltejs/svelte/pull/8613))
- breaking: Stricter types for `createEventDispatcher` (see PR for migration instructions) ([#7224](https://github.com/sveltejs/svelte/pull/7224))
- breaking: Stricter types for `Action` and `ActionReturn` (see PR for migration instructions) ([#7224](https://github.com/sveltejs/svelte/pull/7224))
- breaking: Stricter types for `Action` and `ActionReturn` (see PR for migration instructions) ([#7442](https://github.com/sveltejs/svelte/pull/7442))
- breaking: Stricter types for `onMount` - now throws a type error when returning a function asynchronously to catch potential mistakes around callback functions (see PR for migration instructions) ([#8136](https://github.com/sveltejs/svelte/pull/8136))
- breaking: Overhaul and drastically improve creating custom elements with Svelte (see PR for list of changes and migration instructions) ([#8457](https://github.com/sveltejs/svelte/pull/8457))
- breaking: Deprecate `SvelteComponentTyped` in favor of `SvelteComponent` ([#8512](https://github.com/sveltejs/svelte/pull/8512))
@ -2654,4 +2654,4 @@ Set `style.cssText` rather than `style` ([#44](https://github.com/sveltejs/svelt
## 0.0.1
- Just squatting on the package name
- Just squatting on the package name

@ -74,18 +74,19 @@
"format": "prettier . --cache --plugin-search-dir=. --write",
"check": "prettier . --cache --plugin-search-dir=. --check",
"test": "vitest run && echo \"manually check that there are no type errors in test/types by opening the files in there\"",
"build": "rollup -c && npm run tsd",
"prepare": "npm run build",
"build": "rollup -c && pnpm tsd",
"prepare": "pnpm build",
"generate:version": "node ./scripts/generate-version.js",
"dev": "rollup -cw",
"posttest": "agadoo src/internal/index.js",
"prepublishOnly": "npm run lint && npm run build && npm test",
"prepublishOnly": "pnpm lint && pnpm build && pnpm test",
"tsd": "node ./generate-types.js",
"lint": "eslint \"{src,test}/**/*.{ts,js}\" --cache"
},
"repository": {
"type": "git",
"url": "https://github.com/sveltejs/svelte.git",
"directory":"packages/svelte"
"directory": "packages/svelte"
},
"keywords": [
"UI",

@ -5,14 +5,10 @@ import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import json from '@rollup/plugin-json';
const require = createRequire(import.meta.url);
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf-8'));
// runs the version generation as a side-effect of importing
import './scripts/generate-version.js';
// Create auto-generated .js files
fs.writeFileSync(
'./src/shared/version.js',
`/** @type {string} */\nexport const VERSION = '${pkg.version}';`
);
const require = createRequire(import.meta.url);
const internal = await import('./src/runtime/internal/index.js');
fs.writeFileSync(

@ -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`
);

@ -1,2 +1,4 @@
// generated during release, do not modify
/** @type {string} */
export const VERSION = '4.0.0-next.0';
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'
);
});

@ -1,4 +1,8 @@
lockfileVersion: '6.0'
lockfileVersion: '6.1'
settings:
autoInstallPeers: true
excludeLinksFromLockfile: false
importers:

Loading…
Cancel
Save