8000 chore: Add Changesets (#70) · sveltejs/cli@f623590 · GitHub
[go: up one dir, main page]

Skip to content

Commit f623590

Browse files
authored
chore: Add Changesets (#70)
1 parent f19e406 commit f623590

File tree

97 files changed

+263
-209
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+263
-209
lines changed

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@3.0.3/schema.json",
3+
"changelog": ["@svitejs/changesets-changelog-github-compact", { "repo": "sveltejs/cli" }],
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "public",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": ["!(@sveltejs/*|sv)"]
11+
}

.github/workflows/release.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions: {}
9+
jobs:
10+
release:
11+
# prevents this action from running on forks
12+
if: github.repository == 'sveltejs/cli'
13+
permissions:
14+
contents: write # to create release (changesets/action)
15+
id-token: write # OpenID Connect token needed for provenance
16+
pull-requests: write # to create pull request (changesets/action)
17+
name: Release
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout Repo
21+
uses: actions/checkout@v4
22+
with:
23+
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
24+
fetch-depth: 0
25+
- uses: pnpm/action-setup@v4
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: 18.x
30+
cache: pnpm
31+
32+
- name: Install
33+
run: pnpm install --frozen-lockfile
34+
35+
- name: Build
36+
run: pnpm build
37+
38+
- name: Create Release Pull Request or Publish to npm
39+
id: changesets
40+
uses: changesets/action@v1
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
NPM_CONFIG_PROVENANCE: true
44+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

community-adder-template/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ After that, feel free to open a pull request to [`sv`](https://github.com/svelte
5252

5353
## Things to be aware of
5454

55-
Community adders are **not permitted** to have any external dependencies outside of `@svelte-cli/core`. If the use of a dependency is absolutely necessary, then they can be bundled using a bundler of your choosing (e.g. Rollup, Rolldown, tsup, etc.).
55+
Community adders are **not permitted** to have any external dependencies outside of `@sveltejs/cli-core`. If the use of a dependency is absolutely necessary, then they can be bundled using a bundler of your choosing (e.g. Rollup, Rolldown, tsup, etc.).

community-adder-template/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "community-adder-template",
3+
"private": true,
34
"version": "0.0.0",
45
"license": "MIT",
56
"type": "module",
@@ -15,7 +16,7 @@
1516
"create-temp": "sv create temp --check-types typescript --template skeleton --no-adders --no-install"
1617
},
1718
"dependencies": {
18-
"@svelte-cli/core": "workspace:*"
19+
"@sveltejs/cli-core": "workspace:*"
1920
},
2021
"devDependencies": {
2122
"sv": "workspace:*"

community-adder-template/src/config/adder.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { options } from './options.js';
2-
import { defineAdder } from '@svelte-cli/core';
3-
import { imports } from '@svelte-cli/core/js';
4-
import { parseScript } from '@svelte-cli/core/parsers';
2+
import { defineAdder } from '@sveltejs/cli-core';
3+
import { imports } from '@sveltejs/cli-core/js';
4+
import { parseScript } from '@sveltejs/cli-core/parsers';
55

66
export const adder = defineAdder({
77
id: 'community-adder-template',

community-adder-template/src/config/options.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { defineAdderOptions } from '@svelte-cli/core';
1+
import { defineAdderOptions } from '@sveltejs/cli-core';
22

33
export const options = defineAdderOptions({
44
demo: {

community-adder-template/tests/tests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { defineAdderTests } from '@svelte-cli/core';
1+
import { defineAdderTests } from '@sveltejs/cli-core';
22
import { options } from '../src/config/options.js';
33

44
export const tests = defineAdderTests({

package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,17 @@
88
"check": "pnpm -r check",
99
"lint": "pnpm -r lint && eslint --cache --cache-location node_modules/.eslintcache",
1010
"format": "pnpm -r format",
11-
"changeset:version": "changeset version && pnpm -r generate:version && git add --all",
12-
"changeset:release": "changeset publish",
1311
"dev": "rollup --config --watch",
1412
"build": "rollup -c",
1513
"test": "pnpm -r test"
1614
},
1715
"devDependencies": {
18-
"@changesets/cli": "^2.27.8",
16+
"@changesets/cli": "^2.27.9",
1917
"@rollup/plugin-commonjs": "^26.0.1",
2018
"@rollup/plugin-dynamic-import-vars": "^2.1.2",
2119
"@rollup/plugin-json": "^6.1.0",
2220
"@rollup/plugin-node-resolve": "^15.2.3",
23-
"@svelte-cli/create": "workspace:*",
21+
"@sveltejs/create": "workspace:*",
2422
"@sveltejs/eslint-config": "^8.1.0",
2523
"@svitejs/changesets-changelog-github-compact": "^1.1.0",
2624
"@types/node": "^22.3.0",

packages/adders/_config/official.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { AdderCategories, Category } from './categories.ts';
2-
import type { AdderWithoutExplicitArgs, Adder } from '@svelte-cli/core';
2+
import type { AdderWithoutExplicitArgs, Adder } from '@sveltejs/cli-core';
33

44
// adders
55
import drizzle from '../drizzle/index.ts';

0 commit comments

Comments
 (0)
0