Skip to content

Commit 4375aa7

Browse files
benjiedimaMachina
andauthored
Upgrade to Yarn 4 (#3975)
* Install Yarn4 * Treat yarn files as binary, we don't need to see those diffs (only trusted maintainers should update it) * yarn dedupe * Add explicit return type * Prettier yarml * Add ajv-formats to graphiql-webpack example (needed by copy-webpack-plugin?) * This module doesn't exist any more * TypeScript is being finickity * Directly upgraded yarn.lock * Dedupe babel * Fix GraphQLCache test suite by adding a dev dependency * Fix vitest issue * Dedupe * Meh, no compression thx * Unnecessary changes * fix typecheck * Apply suggestions from code review --------- Co-authored-by: Dimitri POSTOLOV <dmytropostolov@gmail.com>
1 parent 917b505 commit 4375aa7

File tree

13 files changed

+26749
-19860
lines changed

13 files changed

+26749
-19860
lines changed

.changeset/flat-dolls-design.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'graphql-language-service-server': patch
3+
---
4+
5+
fix `GraphQLCache._schemaMap` type, should be `LRUCache`

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@
1111
*.css text eol=lf
1212
*.sh text eol=lf
1313
*.yml text eol=lf
14+
15+
.yarn/releases/*.cjs export-ignore binary linguist-generated

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
.secrets
66
*.log
77

8+
.yarn/*
9+
!.yarn/releases/*
10+
!.yarn/plugins/*
11+
812
node_modules/
913
coverage/
1014
.nyc_output
@@ -28,6 +32,7 @@ package-lock.json
2832

2933
vite.config.d.ts
3034
vite.config.js
35+
tsconfig.vitest-temp.json
3136

3237
.next/
3338
.turbo/

.yarn/releases/yarn-4.9.1.cjs

Lines changed: 948 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.yarnrc

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

.yarnrc.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
compressionLevel: 0
2+
3+
enableGlobalCache: false
4+
5+
nodeLinker: node-modules
6+
7+
yarnPath: .yarn/releases/yarn-4.9.1.cjs

examples/graphiql-webpack/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
2525
"@babel/preset-env": "^7.20.2",
2626
"@babel/preset-react": "^7.18.6",
27+
"ajv-formats": "^3.0.1",
2728
"babel-loader": "^9.1.2",
2829
"copy-webpack-plugin": "11.0.0",
2930
"cross-env": "^7.0.2",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"examples/graphiql-webpack"
1313
]
1414
},
15-
"packageManager": "yarn@1.22.22",
15+
"packageManager": "yarn@4.9.1",
1616
"scripts": {
1717
"types:check": "turbo run types:check",
1818
"dev:graphiql": "turbo run dev --filter=graphiql...",

packages/graphql-language-service-server/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
"@types/glob": "^8.1.0",
7070
"@types/mkdirp": "^1.0.1",
7171
"@types/mock-fs": "^4.13.4",
72+
"@whatwg-node/fetch": "npm:^0.9.0",
7273
"cross-env": "^7.0.2",
7374
"debounce-promise": "^3.1.2",
7475
"graphql": "^16.9.0",

packages/graphql-language-service-server/src/GraphQLCache.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export class GraphQLCache {
119119
_configDir: Uri;
120120
_graphQLFileListCache: Map<Uri, Map<string, GraphQLFileInfo>>;
121121
_graphQLConfig: GraphQLConfig;
122-
_schemaMap: Map<Uri, GraphQLSchema>;
122+
_schemaMap: LRUCache<Uri, GraphQLSchema>;
123123
_typeExtensionMap: Map<Uri, number>;
124124
_fragmentDefinitionsCache: Map<Uri, Map<string, FragmentInfo>>;
125125
_typeDefinitionsCache: Map<Uri, Map<string, ObjectTypeInfo>>;

packages/graphql-language-service-server/src/__tests__/__utils__/MockProject.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ const modules = [
2424
'json-parse-even-better-errors',
2525
'lines-and-columns',
2626
'@babel/code-frame',
27-
'@babel/highlight',
2827
// these i think are just required by jest when you console log from a test
2928
'jest-message-util',
3029
'stack-utils',

packages/monaco-graphql/test/monaco-editor.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ describe('monaco-editor', () => {
1212
// `--no-colors` flag
1313
const lines = stdout.replaceAll(ANSI_COLOR_REGEX, '').split('\n');
1414
// expect(lines[0]).toBe('$ vite build');
15-
// expect(lines[1]).toMatch(' building for production...');
1615
// expect(lines[2]).toBe('transforming...');
17-
expect(lines[3]).toMatch(
16+
expect(lines[2]).toMatch(
1817
`✓ ${parseInt(version, 10) > 16 ? 862 : 848} modules transformed.`,
1918
);
2019
// expect(lines[4]).toBe('rendering chunks...');

0 commit comments

Comments
 (0)