Skip to content

Commit f8fc1d8

Browse files
authored
chore: use changeset (#161)
* chore: use changeset * update
1 parent 89af107 commit f8fc1d8

File tree

6 files changed

+75
-29
lines changed

6 files changed

+75
-29
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: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config/schema.json",
3+
"changelog": [
4+
"@changesets/changelog-github",
5+
{
6+
"repo": "ota-meshi/jsonc-eslint-parser"
7+
}
8+
],
9+
"commit": false,
10+
"linked": [],
11+
"baseBranch": "master",
12+
"updateInternalDependencies": "patch",
13+
"bumpVersionsWithWorkspaceProtocolOnly": true,
14+
"ignore": []
15+
}

.github/workflows/NpmPublish.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/Release.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
permissions:
9+
contents: write
10+
issues: write
11+
pull-requests: write
12+
13+
jobs:
14+
release:
15+
name: Release
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout Repo
19+
uses: actions/checkout@v3
20+
with:
21+
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
22+
fetch-depth: 0
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v3
26+
27+
- name: Install Dependencies
28+
run: npm install --legacy-peer-deps
29+
30+
- name: Create Release Pull Request or Publish to npm
31+
id: changesets
32+
uses: changesets/action@v1
33+
with:
34+
# this expects you to have a npm script called version that runs some logic and then calls `changeset version`.
35+
version: npm run version:ci
36+
# This expects you to have a script called release which does a build for your packages and calls changeset publish
37+
publish: npm run release
38+
commit: "chore: release jsonc-eslint-parser"
39+
title: "chore: release jsonc-eslint-parser"
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

explorer/vue.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ module.exports = {
88
module: require.resolve("./shim/module"),
99
path: require.resolve("./shim/path"),
1010
},
11+
fallback: { util: false },
1112
},
1213
};
1314
},

package.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@
2323
"preversion": "npm test && npm run update && git add .",
2424
"version": "npm run eslint-fix && git add .",
2525
"update-fixtures": "ts-node ./tools/update-fixtures.ts",
26-
"benchmark": "ts-node --transpile-only benchmark/index.ts"
26+
"benchmark": "ts-node --transpile-only benchmark/index.ts",
27+
"prerelease": "npm run clean && npm run build",
28+
"release": "changeset publish",
29+
"version:ci": "changeset version"
2730
},
2831
"repository": {
2932
"type": "git",
@@ -44,6 +47,8 @@
4447
},
4548
"homepage": "https://github.com/ota-meshi/jsonc-eslint-parser#readme",
4649
"devDependencies": {
50+
"@changesets/changelog-github": "^0.4.6",
51+
"@changesets/cli": "^2.24.2",
4752
"@ota-meshi/eslint-plugin": "^0.13.0",
4853
"@types/benchmark": "^2.1.0",
4954
"@types/eslint": "^8.0.0",
@@ -78,5 +83,8 @@
7883
"eslint-visitor-keys": "^3.0.0",
7984
"espree": "^9.0.0",
8085
"semver": "^7.3.5"
86+
},
87+
"publishConfig": {
88+
"access": "public"
8189
}
8290
}

0 commit comments

Comments
 (0)