Skip to content

Commit 804f8b6

Browse files
[v4] Remove GraphQLRuleTester from bundle (#1792)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent f6cdb16 commit 804f8b6

File tree

127 files changed

+1103
-1048
lines changed

Some content is hidden

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

127 files changed

+1103
-1048
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'@graphql-eslint/eslint-plugin': patch
3+
---
4+
5+
dependencies updates:
6+
7+
- Removed dependency
8+
[`@babel/code-frame@^7.18.6` ↗︎](https://www.npmjs.com/package/@babel/code-frame/v/7.18.6) (from
9+
`dependencies`)
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@graphql-eslint/eslint-plugin': major
3+
---
4+
5+
Remove `GraphQLRuleTester` from bundle, to test your rules use regular `RuleTester` from eslint
6+
7+
> **Note**: with this change unnecessary dependency `@babel/code-frame` was removed too
8+
9+
```js
10+
import { RuleTester } from 'eslint'
11+
12+
const ruleTester = new RuleTester({
13+
parser: require.resolve('@graphql-eslint/eslint-plugin')
14+
})
15+
```

.github/workflows/pr.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
name: pr
22
on:
33
pull_request:
4-
branches:
5-
- master
4+
branches: [master]
65

76
jobs:
87
dependencies:

.github/workflows/release.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
name: release
22
on:
33
push:
4-
branches:
5-
- master
4+
branches: [master]
65

76
jobs:
87
stable:

.github/workflows/tests.yml

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: test
22

33
on:
44
push:
5-
branches: [master]
5+
branches: [master, v4]
66
pull_request:
7-
branches: [master]
7+
branches: [master, v4]
88

99
jobs:
1010
lint:
@@ -44,12 +44,6 @@ jobs:
4444
- name: Build
4545
run: pnpm build
4646

47-
- name: Upload Build Artifact
48-
uses: actions/upload-artifact@v3
49-
with:
50-
name: build-artifact
51-
path: packages/plugin/dist
52-
5347
test:
5448
name: Node.js v${{matrix.node_version}} / GraphQL v${{matrix.graphql_version}} / ESLint v8
5549
timeout-minutes: 60
@@ -78,14 +72,6 @@ jobs:
7872
- name: Install Dependencies
7973
run: pnpm i --no-frozen-lockfile
8074

81-
# We need build for examples.spec.ts test
82-
# Otherwise we'll get error - Cannot find module 'node_modules/@graphql-eslint/eslint-plugin/dist/index.js'
83-
- name: Download Build Artifact
84-
uses: actions/download-artifact@v3
85-
with:
86-
name: build-artifact
87-
path: packages/plugin/dist
88-
8975
- name: Test
9076
run: pnpm test
9177
env:

.github/workflows/website-integrity.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: Fetch
1414
run: git fetch origin master
1515

16-
- name: Setup env
16+
- name: Setup ENV
1717
uses: the-guild-org/shared-config/setup@main
1818
with:
1919
nodeVersion: 18
@@ -28,15 +28,15 @@ jobs:
2828
- name: Compare
2929
run: git diff origin/${{ github.base_ref }}.. -- website/route-lockfile.txt
3030

31-
- name: Diff to file
31+
- name: Diff to File
3232
if: always()
3333
id: diff_result
3434
run: |
3535
echo "result<<EOF" >> $GITHUB_OUTPUT
3636
echo "$(git diff origin/${{ github.base_ref }}.. -- website/route-lockfile.txt)" >> $GITHUB_OUTPUT
3737
echo EOF >> $GITHUB_OUTPUT
3838
39-
- name: Publish a message
39+
- name: Publish a Message
4040
if: always() && contains(steps.diff_result.outputs.result, 'diff')
4141
uses: marocchino/sticky-pull-request-comment@v2
4242
with:

.github/workflows/website.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@ name: website
22

33
on:
44
push:
5-
branches:
6-
- master
5+
branches: [master, v4]
76
pull_request:
8-
branches:
9-
- master
7+
branches: [master, v4]
108

119
jobs:
1210
deployment:

examples/basic/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
"devDependencies": {
1515
"@eslint/js": "8.46.0",
1616
"@graphql-eslint/eslint-plugin": "workspace:*",
17-
"eslint": "8.38.0"
17+
"eslint": "8.46.0"
1818
}
1919
}

examples/code-file/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
"devDependencies": {
1515
"@eslint/js": "8.46.0",
1616
"@graphql-eslint/eslint-plugin": "workspace:*",
17-
"eslint": "8.38.0"
17+
"eslint": "8.46.0"
1818
}
1919
}

examples/graphql-config-code-file/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
"devDependencies": {
1616
"@eslint/js": "8.46.0",
1717
"@graphql-eslint/eslint-plugin": "workspace:*",
18-
"eslint": "8.38.0"
18+
"eslint": "8.46.0"
1919
}
2020
}

0 commit comments

Comments
 (0)