Skip to content

Commit 4c7e288

Browse files
authored
Merge pull request #1 from docker/yarn-v3
update to Yarn 3.3.1
2 parents 9a5a290 + 5fd129b commit 4c7e288

10 files changed

+7671
-4214
lines changed

.dockerignore

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
/coverage
2-
/lib
3-
/node_modules
4-
/src/package.json
5-
/src/README.md
2+
3+
# Dependency directories
4+
node_modules/
5+
jspm_packages/
6+
7+
# yarn v2
8+
.yarn/cache
9+
.yarn/unplugged
10+
.yarn/build-state.yml
11+
.yarn/install-state.gz
12+
.pnp.*

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/.yarn/releases/** binary
2+
/.yarn/plugins/** binary

.gitignore

Lines changed: 18 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
lib
2-
node_modules
1+
# https://raw.githubusercontent.com/github/gitignore/main/Node.gitignore
32

4-
# Rest of the file pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
53
# Logs
64
logs
75
*.log
86
npm-debug.log*
97
yarn-debug.log*
108
yarn-error.log*
119
lerna-debug.log*
10+
.pnpm-debug.log*
1211

1312
# Diagnostic reports (https://nodejs.org/api/report.html)
1413
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
@@ -19,34 +18,14 @@ pids
1918
*.seed
2019
*.pid.lock
2120

22-
# Directory for instrumented libs generated by jscoverage/JSCover
23-
lib-cov
24-
2521
# Coverage directory used by tools like istanbul
2622
coverage
2723
*.lcov
2824

29-
# nyc test coverage
30-
.nyc_output
31-
32-
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
33-
.grunt
34-
35-
# Bower dependency directory (https://bower.io/)
36-
bower_components
37-
38-
# node-waf configuration
39-
.lock-wscript
40-
41-
# Compiled binary addons (https://nodejs.org/api/addons.html)
42-
build/Release
43-
4425
# Dependency directories
26+
node_modules/
4527
jspm_packages/
4628

47-
# TypeScript v1 declaration files
48-
typings/
49-
5029
# TypeScript cache
5130
*.tsbuildinfo
5231

@@ -56,36 +35,22 @@ typings/
5635
# Optional eslint cache
5736
.eslintcache
5837

59-
# Optional REPL history
60-
.node_repl_history
61-
62-
# Output of 'npm pack'
63-
*.tgz
64-
6538
# Yarn Integrity file
6639
.yarn-integrity
6740

68-
# dotenv environment variables file
41+
# dotenv environment variable files
6942
.env
70-
.env.test
71-
72-
# parcel-bundler cache (https://parceljs.org/)
73-
.cache
74-
75-
# next.js build output
76-
.next
77-
78-
# nuxt.js build output
79-
.nuxt
80-
81-
# vuepress build output
82-
.vuepress/dist
83-
84-
# Serverless directories
85-
.serverless/
86-
87-
# FuseBox cache
88-
.fusebox/
89-
90-
# DynamoDB Local files
91-
.dynamodb/
43+
.env.development.local
44+
.env.test.local
45+
.env.production.local
46+
.env.local
47+
48+
# yarn v2
49+
.yarn/cache
50+
.yarn/unplugged
51+
.yarn/build-state.yml
52+
.yarn/install-state.gz
53+
.pnp.*
54+
55+
# Lib
56+
/lib

.prettierignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Dependency directories
2+
node_modules/
3+
jspm_packages/
4+
5+
# yarn v2
6+
.yarn/

.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

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

.yarn/releases/yarn-3.3.1.cjs

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

.yarnrc.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
nodeLinker: node-modules
2+
3+
plugins:
4+
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
5+
spec: "@yarnpkg/plugin-interactive-tools"
6+
7+
yarnPath: .yarn/releases/yarn-3.3.1.cjs

dev.Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ ARG BUILDX_VERSION=0.10.0
66

77
FROM node:${NODE_VERSION}-alpine AS base
88
RUN apk add --no-cache cpio findutils git
9+
RUN yarn config set --home enableTelemetry 0
910
WORKDIR /src
1011

1112
FROM base AS deps
1213
RUN --mount=type=bind,target=.,rw \
14+
--mount=type=cache,target=/src/.yarn/cache \
1315
--mount=type=cache,target=/src/node_modules \
1416
yarn install && mkdir /vendor && cp yarn.lock /vendor
1517

@@ -30,6 +32,7 @@ EOT
3032

3133
FROM deps AS build
3234
RUN --mount=type=bind,target=.,rw \
35+
--mount=type=cache,target=/src/.yarn/cache \
3336
--mount=type=cache,target=/src/node_modules \
3437
yarn run build && mkdir /out && cp -Rf lib /out/
3538

@@ -38,9 +41,10 @@ COPY --from=build /out /
3841

3942
FROM deps AS format
4043
RUN --mount=type=bind,target=.,rw \
44+
--mount=type=cache,target=/src/.yarn/cache \
4145
--mount=type=cache,target=/src/node_modules \
4246
yarn run format \
43-
&& mkdir /out && find . -name '*.ts' -not -path './node_modules/*' | cpio -pdm /out
47+
&& mkdir /out && find . -name '*.ts' -not -path './node_modules/*' -not -path './.yarn/*' | cpio -pdm /out
4448

4549
FROM scratch AS format-update
4650
COPY --from=format /out /
@@ -55,6 +59,7 @@ FROM docker/buildx-bin:${BUILDX_VERSION} as buildx
5559

5660
FROM deps AS test
5761
RUN --mount=type=bind,target=.,rw \
62+
--mount=type=cache,target=/src/.yarn/cache \
5863
--mount=type=cache,target=/src/node_modules \
5964
--mount=type=bind,from=docker,source=/usr/local/bin/docker,target=/usr/bin/docker \
6065
--mount=type=bind,from=buildx,source=/buildx,target=/usr/libexec/docker/cli-plugins/docker-buildx \

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
],
2323
"author": "Docker Inc.",
2424
"license": "Apache-2.0",
25+
"packageManager": "yarn@3.3.1",
2526
"main": "lib/toolkit.js",
2627
"types": "lib/toolkit.d.ts",
2728
"directories": {

0 commit comments

Comments
 (0)