Skip to content
This repository was archived by the owner on Nov 19, 2025. It is now read-only.

Commit c231fc2

Browse files
Upgrade to yarn 4
1 parent a82d2d5 commit c231fc2

File tree

7 files changed

+4562
-2547
lines changed

7 files changed

+4562
-2547
lines changed

.github/workflows/build.yml

Lines changed: 10 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,11 @@ jobs:
4646
- name: Fetch submodule tags
4747
working-directory: compiler
4848
run: git fetch --tags https://github.com/google/closure-compiler.git
49-
- name: Get yarn cache directory path
50-
run: echo "yarn_cache_dir=$(yarn cache dir)" >> $GITHUB_ENV
51-
- name: Yarn and maven cache
52-
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # 4.2.3
53-
with:
54-
path: |
55-
${{ env.yarn_cache_dir }}
56-
~/.m2/repository
57-
key: ${{ runner.os }}-yarn-mvn-java11-${{ hashFiles('**/yarn.lock', '**/pom.xml') }}
49+
- name: Use Node.js ${{ env.NODE_VERSION }}
50+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # 4.4.0
51+
with:
52+
node-version: ${{ env.NODE_VERSION }}
53+
cache: yarn
5854
- name: Install packages
5955
run: yarn install --colors=always
6056
- name: Build jar
@@ -103,6 +99,7 @@ jobs:
10399
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # 4.4.0
104100
with:
105101
node-version: ${{ env.NODE_VERSION }}
102+
cache: yarn
106103
- uses: graalvm/setup-graalvm@01ed653ac833fe80569f1ef9f25585ba2811baab # 1.3.3
107104
with:
108105
java-version: 21
@@ -124,16 +121,6 @@ jobs:
124121
with:
125122
name: Externs folder
126123
path: packages/google-closure-compiler/externs
127-
- name: Get yarn cache directory path
128-
run: echo "yarn_cache_dir=$(yarn cache dir)" >> $GITHUB_ENV
129-
- name: Cache yarn
130-
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # 4.2.3
131-
id: yarn-cache
132-
with:
133-
path: ${{ env.yarn_cache_dir }}
134-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
135-
restore-keys: |
136-
${{ runner.os }}-yarn-
137124
- name: Install packages
138125
run: yarn install --colors=always
139126
- name: Build image
@@ -174,6 +161,7 @@ jobs:
174161
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # 4.4.0
175162
with:
176163
node-version: ${{ env.NODE_VERSION }}
164+
cache: yarn
177165
- uses: graalvm/setup-graalvm@01ed653ac833fe80569f1ef9f25585ba2811baab # 1.3.3
178166
with:
179167
java-version: 21
@@ -195,16 +183,6 @@ jobs:
195183
with:
196184
name: Externs folder
197185
path: packages/google-closure-compiler/externs
198-
- name: Get yarn cache directory path
199-
run: echo "yarn_cache_dir=$(yarn cache dir)" >> $GITHUB_ENV
200-
- name: Cache yarn
201-
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # 4.2.3
202-
id: yarn-cache
203-
with:
204-
path: ${{ env.yarn_cache_dir }}
205-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
206-
restore-keys: |
207-
${{ runner.os }}-yarn-
208186
- name: Install packages
209187
run: yarn install --colors=always
210188
- name: Build image
@@ -243,6 +221,7 @@ jobs:
243221
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # 4.4.0
244222
with:
245223
node-version: ${{ env.NODE_VERSION }}
224+
cache: yarn
246225
- uses: graalvm/setup-graalvm@01ed653ac833fe80569f1ef9f25585ba2811baab # 1.3.3
247226
with:
248227
java-version: 21
@@ -264,16 +243,6 @@ jobs:
264243
with:
265244
name: Externs folder
266245
path: packages/google-closure-compiler/externs
267-
- name: Get yarn cache directory path
268-
run: echo "yarn_cache_dir=$(yarn cache dir)" >> $GITHUB_ENV
269-
- name: Cache yarn
270-
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # 4.2.3
271-
id: yarn-cache
272-
with:
273-
path: ${{ env.yarn_cache_dir }}
274-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
275-
restore-keys: |
276-
${{ runner.os }}-yarn-
277246
- name: Install packages
278247
run: yarn install --colors=always
279248
- name: Build image
@@ -312,6 +281,7 @@ jobs:
312281
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # 4.4.0
313282
with:
314283
node-version: ${{ env.NODE_VERSION }}
284+
cache: yarn
315285
- uses: graalvm/setup-graalvm@01ed653ac833fe80569f1ef9f25585ba2811baab # 1.3.3
316286
with:
317287
java-version: 21
@@ -333,17 +303,6 @@ jobs:
333303
with:
334304
name: Externs folder
335305
path: packages/google-closure-compiler/externs
336-
- name: Get yarn cache directory path
337-
# See https://stackoverflow.com/a/66737579/1211524
338-
run: echo "yarn_cache_dir=$(yarn cache dir)" >> $env:GITHUB_ENV
339-
- name: Cache yarn
340-
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # 4.2.3
341-
id: yarn-cache
342-
with:
343-
path: ${{ env.yarn_cache_dir }}
344-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
345-
restore-keys: |
346-
${{ runner.os }}-yarn-
347306
- name: Install packages
348307
run: yarn install --colors=always
349308
- name: Build image
@@ -385,6 +344,7 @@ jobs:
385344
with:
386345
node-version: ${{ env.NODE_VERSION }}
387346
registry-url: https://registry.npmjs.org/
347+
cache: yarn
388348
- name: Download compiler jar
389349
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # 4.3.0
390350
with:
@@ -426,16 +386,6 @@ jobs:
426386
chmod 755 packages/google-closure-compiler-linux-arm64/compiler
427387
chmod 755 packages/google-closure-compiler-macos/compiler
428388
chmod 755 packages/google-closure-compiler-windows/compiler.exe
429-
- name: Get yarn cache directory path
430-
run: echo "yarn_cache_dir=$(yarn cache dir)" >> $GITHUB_ENV
431-
- name: Cache yarn
432-
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # 4.2.3
433-
id: yarn-cache
434-
with:
435-
path: ${{ env.yarn_cache_dir }}
436-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
437-
restore-keys: |
438-
${{ runner.os }}-yarn-
439389
- name: Install packages
440390
run: yarn install --colors=always
441391
- name: Prepare for publish

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,10 @@ yarn-error.log
1515
/temp
1616
/publish-log.txt
1717
.npmrc
18+
.pnp.*
19+
.yarn/*
20+
!.yarn/patches
21+
!.yarn/plugins
22+
!.yarn/releases
23+
!.yarn/sdks
24+
!.yarn/versions

.yarn/releases/yarn-4.9.1.cjs

Lines changed: 948 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
nodeLinker: node-modules
2+
yarnPath: .yarn/releases/yarn-4.9.1.cjs
3+
npmRegistryServer: "https://registry.npmjs.org"

package.json

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"url": "https://github.com/google/closure-compiler/issues"
3030
},
3131
"homepage": "https://developers.google.com/closure/compiler/",
32-
"dependencies": {},
3332
"devDependencies": {
3433
"glob": "11.x",
3534
"graphlib": "2.x",
@@ -39,11 +38,14 @@
3938
"semver": "5.x"
4039
},
4140
"resolutions": {
42-
"**/glob-stream/**/glob-parent": "^5.1.2",
43-
"**/glob-watcher": "^6.0.0",
44-
"**/gulp-cli/**/debug": "^3.0.0",
45-
"**/gulp-cli/**/micromatch": "^4.0.8",
46-
"**/gulp-cli/**/yargs-parser": "^13.1.2"
41+
"chokidar/glob-parent": "^5.1.2",
42+
"expand-brackets/debug": "^3.0.0",
43+
"findup-sync/micromatch": "^4.0.8",
44+
"glob-stream/glob-parent": "^5.1.2",
45+
"glob-watcher": "^6.0.0",
46+
"matchdep/micromatch": "^4.0.8",
47+
"snapdragon/debug": "^3.0.0",
48+
"yargs": "^13.3.0"
4749
},
4850
"scripts": {
4951
"build": "./build-scripts/build.sh",
@@ -52,5 +54,6 @@
5254
"clean": "./build-scripts/clean.sh",
5355
"version": "./build-scripts/version-packages.js",
5456
"publish-packages": "./build-scripts/publish.js"
55-
}
57+
},
58+
"packageManager": "[email protected]"
5659
}

packages/google-closure-compiler/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@
1616
"gulpplugin",
1717
"gruntplugin"
1818
],
19-
"bin": {
20-
"google-closure-compiler": "cli.js"
21-
},
19+
"bin": "cli.js",
2220
"main": "index.js",
2321
"contributors": [
2422
{

0 commit comments

Comments
 (0)