eslint-plugin-primer-react 8.5.0-rc.1eb9de5 → 8.5.0-rc.3b7ba50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/release.yml +123 -8
- package/.github/workflows/release_tracking.yml +1 -1
- package/CHANGELOG.md +4 -0
- package/package.json +3 -3
- package/src/rules/__tests__/no-system-props.test.js +1 -0
- package/src/rules/no-system-props.js +1 -0
- package/.github/workflows/release_canary.yml +0 -64
- package/.github/workflows/release_candidate.yml +0 -59
- package/package-lock.json +0 -9904
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
name: Release
|
|
2
|
+
|
|
2
3
|
on:
|
|
3
4
|
push:
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
concurrency:
|
|
7
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
8
|
+
cancel-in-progress: true
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
id-token: write # Required for OIDC
|
|
12
|
+
contents: read
|
|
13
|
+
checks: write
|
|
14
|
+
statuses: write
|
|
15
|
+
|
|
6
16
|
jobs:
|
|
7
|
-
release:
|
|
17
|
+
release-main:
|
|
18
|
+
if: ${{ github.ref_name == 'main' }}
|
|
19
|
+
name: Main
|
|
8
20
|
runs-on: ubuntu-latest
|
|
9
21
|
steps:
|
|
10
22
|
- name: Checkout repository
|
|
@@ -14,21 +26,124 @@ jobs:
|
|
|
14
26
|
fetch-depth: 0
|
|
15
27
|
persist-credentials: false
|
|
16
28
|
|
|
29
|
+
- uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42
|
|
30
|
+
id: app-token
|
|
31
|
+
with:
|
|
32
|
+
app-id: ${{ vars.PRIMER_APP_ID_SHARED }}
|
|
33
|
+
private-key: ${{ secrets.PRIMER_APP_PRIVATE_KEY_SHARED }}
|
|
34
|
+
|
|
17
35
|
- name: Set up Node.js
|
|
18
|
-
uses: actions/setup-node@
|
|
36
|
+
uses: actions/setup-node@v6
|
|
19
37
|
with:
|
|
20
|
-
node-version:
|
|
38
|
+
node-version: 24
|
|
21
39
|
|
|
22
40
|
- name: Install dependencies
|
|
23
41
|
run: npm ci
|
|
24
42
|
|
|
25
43
|
- name: Create release pull request or publish to npm
|
|
26
44
|
id: changesets
|
|
27
|
-
uses: changesets/action@
|
|
45
|
+
uses: changesets/action@v1
|
|
28
46
|
with:
|
|
29
47
|
title: Release Tracking
|
|
30
48
|
# This expects you to have a script called release which does a build for your packages and calls changeset publish
|
|
31
49
|
publish: npm run release
|
|
32
50
|
env:
|
|
33
|
-
GITHUB_TOKEN: ${{
|
|
34
|
-
|
|
51
|
+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
|
|
52
|
+
|
|
53
|
+
release-canary:
|
|
54
|
+
name: Canary
|
|
55
|
+
if: ${{ github.repository == 'primer/eslint-plugin-primer-react' && github.ref_name != 'main' && github.ref_name != 'changeset-release/main' }}
|
|
56
|
+
runs-on: ubuntu-latest
|
|
57
|
+
steps:
|
|
58
|
+
- name: Checkout repository
|
|
59
|
+
uses: actions/checkout@v5
|
|
60
|
+
with:
|
|
61
|
+
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
|
|
62
|
+
fetch-depth: 0
|
|
63
|
+
|
|
64
|
+
- name: Set up Node.js
|
|
65
|
+
uses: actions/setup-node@v6
|
|
66
|
+
with:
|
|
67
|
+
node-version: 24
|
|
68
|
+
|
|
69
|
+
- name: Install dependencies
|
|
70
|
+
run: npm ci
|
|
71
|
+
|
|
72
|
+
- name: Build
|
|
73
|
+
run: npm run build --if-present
|
|
74
|
+
|
|
75
|
+
- name: Publish canary version
|
|
76
|
+
run: |
|
|
77
|
+
echo "$( jq '.version = "0.0.0"' package.json )" > package.json
|
|
78
|
+
echo -e "---\n'eslint-plugin-primer-react': patch\n---\n\nFake entry to force publishing" > .changeset/force-snapshot-release.md
|
|
79
|
+
npx changeset version --snapshot
|
|
80
|
+
npx changeset publish --tag canary
|
|
81
|
+
env:
|
|
82
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
83
|
+
|
|
84
|
+
- name: Output canary version number
|
|
85
|
+
uses: actions/github-script@v7.0.1
|
|
86
|
+
with:
|
|
87
|
+
script: |
|
|
88
|
+
const package = require(`${process.env.GITHUB_WORKSPACE}/package.json`)
|
|
89
|
+
github.rest.repos.createCommitStatus({
|
|
90
|
+
owner: context.repo.owner,
|
|
91
|
+
repo: context.repo.repo,
|
|
92
|
+
sha: context.sha,
|
|
93
|
+
state: 'success',
|
|
94
|
+
context: `Published ${package.name}`,
|
|
95
|
+
description: package.version,
|
|
96
|
+
target_url: `https://unpkg.com/${package.name}@${package.version}/`
|
|
97
|
+
})
|
|
98
|
+
|
|
99
|
+
- name: Upload versions json file
|
|
100
|
+
uses: primer/.github/.github/actions/upload-versions@main
|
|
101
|
+
|
|
102
|
+
release-candidate:
|
|
103
|
+
name: Candidate
|
|
104
|
+
if: ${{ github.repository == 'primer/eslint-plugin-primer-react' && github.ref_name == 'changeset-release/main' }}
|
|
105
|
+
|
|
106
|
+
runs-on: ubuntu-latest
|
|
107
|
+
steps:
|
|
108
|
+
- name: Checkout repository
|
|
109
|
+
uses: actions/checkout@v5
|
|
110
|
+
with:
|
|
111
|
+
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
|
|
112
|
+
fetch-depth: 0
|
|
113
|
+
|
|
114
|
+
- name: Set up Node.js
|
|
115
|
+
uses: actions/setup-node@v6
|
|
116
|
+
with:
|
|
117
|
+
node-version: 24
|
|
118
|
+
|
|
119
|
+
- name: Install dependencies
|
|
120
|
+
run: npm ci
|
|
121
|
+
|
|
122
|
+
- name: Build
|
|
123
|
+
run: npm run build --if-present
|
|
124
|
+
|
|
125
|
+
- name: Publish release candidate
|
|
126
|
+
run: |
|
|
127
|
+
version=$(jq -r .version package.json)
|
|
128
|
+
echo "$( jq ".version = \"$(echo $version)-rc.$(git rev-parse --short HEAD)\"" package.json )" > package.json
|
|
129
|
+
npm publish --tag next
|
|
130
|
+
env:
|
|
131
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
132
|
+
|
|
133
|
+
- name: Output release candidate version number
|
|
134
|
+
uses: actions/github-script@v7.0.1
|
|
135
|
+
with:
|
|
136
|
+
script: |
|
|
137
|
+
const package = require(`${process.env.GITHUB_WORKSPACE}/package.json`)
|
|
138
|
+
github.rest.repos.createCommitStatus({
|
|
139
|
+
owner: context.repo.owner,
|
|
140
|
+
repo: context.repo.repo,
|
|
141
|
+
sha: context.sha,
|
|
142
|
+
state: 'success',
|
|
143
|
+
context: `Published ${package.name}`,
|
|
144
|
+
description: package.version,
|
|
145
|
+
target_url: `https://unpkg.com/${package.name}@${package.version}/`
|
|
146
|
+
})
|
|
147
|
+
|
|
148
|
+
- name: Upload versions json file
|
|
149
|
+
uses: primer/.github/.github/actions/upload-versions@main
|
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,10 @@
|
|
|
6
6
|
|
|
7
7
|
- [#443](https://github.com/primer/eslint-plugin-primer-react/pull/443) [`8865e3a`](https://github.com/primer/eslint-plugin-primer-react/commit/8865e3af43dfd302ed345c5b9243c32abe7cebad) Thanks [@hectahertz](https://github.com/hectahertz)! - Add no-use-responsive-value
|
|
8
8
|
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- [#454](https://github.com/primer/eslint-plugin-primer-react/pull/454) [`917f344`](https://github.com/primer/eslint-plugin-primer-react/commit/917f344f61beeb8bd5817e89456a135769319003) Thanks [@francinelucca](https://github.com/francinelucca)! - no-system-props: allow 'overflow' prop in Breadcrumbs
|
|
12
|
+
|
|
9
13
|
## 8.4.0
|
|
10
14
|
|
|
11
15
|
### Minor Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-primer-react",
|
|
3
|
-
"version": "8.5.0-rc.
|
|
3
|
+
"version": "8.5.0-rc.3b7ba50",
|
|
4
4
|
"description": "ESLint rules for Primer React",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"engines": {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@github/markdownlint-github": "^0.6.3",
|
|
47
47
|
"@github/prettier-config": "0.0.6",
|
|
48
48
|
"@types/jest": "^30.0.0",
|
|
49
|
-
"@typescript-eslint/rule-tester": "8.
|
|
49
|
+
"@typescript-eslint/rule-tester": "8.47.0",
|
|
50
50
|
"eslint": "^9.0.0",
|
|
51
51
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
52
52
|
"eslint-plugin-filenames": "^1.3.2",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"globals": "^16.3.0",
|
|
58
58
|
"jest": "^30.0.5",
|
|
59
59
|
"markdownlint-cli2": "^0.18.1",
|
|
60
|
-
"markdownlint-cli2-formatter-pretty": "^0.0.
|
|
60
|
+
"markdownlint-cli2-formatter-pretty": "^0.0.9"
|
|
61
61
|
},
|
|
62
62
|
"prettier": "@github/prettier-config"
|
|
63
63
|
}
|
|
@@ -24,6 +24,7 @@ ruleTester.run('no-system-props', rule, {
|
|
|
24
24
|
`import {Button} from '@primer/react'; <Button variant="large" />`,
|
|
25
25
|
`import {Button} from '@primer/react'; <Button size="large" />`,
|
|
26
26
|
`import {ActionMenu} from '@primer/react'; <ActionMenu.Overlay width="large" />`,
|
|
27
|
+
`import {Breadcrumbs} from '@primer/react'; <Breadcrumbs overflow="auto" />`,
|
|
27
28
|
{code: `<img width="200px" />`, options: [{skipImportCheck: true}]},
|
|
28
29
|
{code: `<Placeholder width="200px" />`, options: [{skipImportCheck: true, ignoreNames: ['Placeholder']}]},
|
|
29
30
|
{
|
|
@@ -21,6 +21,7 @@ const excludedComponentProps = new Map([
|
|
|
21
21
|
['Avatar', new Set(['size'])],
|
|
22
22
|
['AvatarToken', new Set(['size'])],
|
|
23
23
|
['Blankslate', new Set(['border'])],
|
|
24
|
+
['Breadcrumbs', new Set(['overflow'])],
|
|
24
25
|
['Button', new Set(['alignContent'])],
|
|
25
26
|
['CircleOcticon', new Set(['size'])],
|
|
26
27
|
['Dialog', new Set(['width', 'height', 'position'])],
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
name: Release (canary)
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
branches-ignore:
|
|
5
|
-
- 'main'
|
|
6
|
-
- 'changeset-release/main'
|
|
7
|
-
|
|
8
|
-
concurrency:
|
|
9
|
-
group: npm-canary
|
|
10
|
-
cancel-in-progress: false
|
|
11
|
-
|
|
12
|
-
jobs:
|
|
13
|
-
release:
|
|
14
|
-
if: ${{ github.repository == 'primer/eslint-plugin-primer-react' }}
|
|
15
|
-
runs-on: ubuntu-latest
|
|
16
|
-
steps:
|
|
17
|
-
- name: Checkout repository
|
|
18
|
-
uses: actions/checkout@v5
|
|
19
|
-
with:
|
|
20
|
-
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
|
|
21
|
-
fetch-depth: 0
|
|
22
|
-
|
|
23
|
-
- name: Set up Node.js
|
|
24
|
-
uses: actions/setup-node@v4
|
|
25
|
-
with:
|
|
26
|
-
node-version: 20
|
|
27
|
-
|
|
28
|
-
- name: Install dependencies
|
|
29
|
-
run: npm ci
|
|
30
|
-
|
|
31
|
-
- name: Build
|
|
32
|
-
run: npm run build --if-present
|
|
33
|
-
|
|
34
|
-
- name: Create .npmrc
|
|
35
|
-
run: |
|
|
36
|
-
cat << EOF > "$HOME/.npmrc"
|
|
37
|
-
//registry.npmjs.org/:_authToken=$NPM_TOKEN
|
|
38
|
-
EOF
|
|
39
|
-
env:
|
|
40
|
-
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN_SHARED }}
|
|
41
|
-
|
|
42
|
-
- name: Publish canary version
|
|
43
|
-
run: |
|
|
44
|
-
echo "$( jq '.version = "0.0.0"' package.json )" > package.json
|
|
45
|
-
echo -e "---\n'eslint-plugin-primer-react': patch\n---\n\nFake entry to force publishing" > .changeset/force-snapshot-release.md
|
|
46
|
-
yarn changeset version --snapshot
|
|
47
|
-
yarn changeset publish --tag canary
|
|
48
|
-
env:
|
|
49
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
50
|
-
|
|
51
|
-
- name: Output canary version number
|
|
52
|
-
uses: actions/github-script@v7.0.1
|
|
53
|
-
with:
|
|
54
|
-
script: |
|
|
55
|
-
const package = require(`${process.env.GITHUB_WORKSPACE}/package.json`)
|
|
56
|
-
github.rest.repos.createCommitStatus({
|
|
57
|
-
owner: context.repo.owner,
|
|
58
|
-
repo: context.repo.repo,
|
|
59
|
-
sha: context.sha,
|
|
60
|
-
state: 'success',
|
|
61
|
-
context: `Published ${package.name}`,
|
|
62
|
-
description: package.version,
|
|
63
|
-
target_url: `https://unpkg.com/${package.name}@${package.version}/`
|
|
64
|
-
})
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
name: Release (candidate)
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
branches:
|
|
5
|
-
- 'changeset-release/main'
|
|
6
|
-
|
|
7
|
-
jobs:
|
|
8
|
-
release:
|
|
9
|
-
if: ${{ github.repository == 'primer/eslint-plugin-primer-react' }}
|
|
10
|
-
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
steps:
|
|
13
|
-
- name: Checkout repository
|
|
14
|
-
uses: actions/checkout@v5
|
|
15
|
-
with:
|
|
16
|
-
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
|
|
17
|
-
fetch-depth: 0
|
|
18
|
-
|
|
19
|
-
- name: Set up Node.js
|
|
20
|
-
uses: actions/setup-node@v4
|
|
21
|
-
with:
|
|
22
|
-
node-version: 20
|
|
23
|
-
|
|
24
|
-
- name: Install dependencies
|
|
25
|
-
run: npm ci
|
|
26
|
-
|
|
27
|
-
- name: Build
|
|
28
|
-
run: npm run build --if-present
|
|
29
|
-
|
|
30
|
-
- name: Create .npmrc
|
|
31
|
-
run: |
|
|
32
|
-
cat << EOF > "$HOME/.npmrc"
|
|
33
|
-
//registry.npmjs.org/:_authToken=$NPM_TOKEN
|
|
34
|
-
EOF
|
|
35
|
-
env:
|
|
36
|
-
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN_SHARED }}
|
|
37
|
-
|
|
38
|
-
- name: Publish release candidate
|
|
39
|
-
run: |
|
|
40
|
-
version=$(jq -r .version package.json)
|
|
41
|
-
echo "$( jq ".version = \"$(echo $version)-rc.$(git rev-parse --short HEAD)\"" package.json )" > package.json
|
|
42
|
-
yarn publish --tag next
|
|
43
|
-
env:
|
|
44
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
45
|
-
|
|
46
|
-
- name: Output release candidate version number
|
|
47
|
-
uses: actions/github-script@v7.0.1
|
|
48
|
-
with:
|
|
49
|
-
script: |
|
|
50
|
-
const package = require(`${process.env.GITHUB_WORKSPACE}/package.json`)
|
|
51
|
-
github.rest.repos.createCommitStatus({
|
|
52
|
-
owner: context.repo.owner,
|
|
53
|
-
repo: context.repo.repo,
|
|
54
|
-
sha: context.sha,
|
|
55
|
-
state: 'success',
|
|
56
|
-
context: `Published ${package.name}`,
|
|
57
|
-
description: package.version,
|
|
58
|
-
target_url: `https://unpkg.com/${package.name}@${package.version}/`
|
|
59
|
-
})
|