Skip to content

Commit 7af5420

Browse files
committed
chore: enforce code quality standards
- Add build/ to .gitignore - Add files field to package.json (src, bin) - Add CI release workflow (OIDC + changesets) - Add .changeset/config.json
1 parent c852d31 commit 7af5420

4 files changed

Lines changed: 76 additions & 4 deletions

File tree

‎.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.0/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "public",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

‎.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: [main]
6+
7+
concurrency:
8+
group: release-${{ github.ref }}
9+
cancel-in-progress: false
10+
11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
id-token: write
15+
16+
jobs:
17+
release:
18+
name: Version & Publish
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
25+
- uses: actions/setup-node@v4
26+
with:
27+
node-version: 20
28+
registry-url: https://registry.npmjs.org
29+
30+
- run: npm ci
31+
32+
- name: Create Release Pull Request or Publish
33+
uses: changesets/action@v1
34+
with:
35+
publish: npx changeset publish
36+
version: npx changeset version
37+
commit: "chore(release): version packages"
38+
title: "chore(release): version packages"
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
42+
NPM_CONFIG_PROVENANCE: "true"

‎.gitignore‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,5 @@ Thumbs.db
3131

3232
# package
3333
*.tgz
34+
35+
build/

‎package.json‎

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,27 @@
33
"version": "1.0.0",
44
"description": "Compare package-lock.json between git refs — see exactly what changed in your dependencies",
55
"main": "src/index.js",
6-
"bin": { "lockdiff": "src/cli.js" },
7-
"scripts": { "test": "node test/index.test.js" },
8-
"keywords": ["lockfile", "diff", "npm", "dependencies", "code-review", "package-lock"],
6+
"bin": {
7+
"lockdiff": "src/cli.js"
8+
},
9+
"scripts": {
10+
"test": "node test/index.test.js"
11+
},
12+
"keywords": [
13+
"lockfile",
14+
"diff",
15+
"npm",
16+
"dependencies",
17+
"code-review",
18+
"package-lock"
19+
],
920
"author": "sulthonzh",
1021
"license": "MIT",
11-
"engines": { "node": ">=14" }
22+
"engines": {
23+
"node": ">=14"
24+
},
25+
"files": [
26+
"src",
27+
"bin"
28+
]
1229
}

0 commit comments

Comments
 (0)