Skip to content

Commit 1971cbf

Browse files
committed
berry
1 parent bc195e4 commit 1971cbf

File tree

8 files changed

+20989
-162430
lines changed

8 files changed

+20989
-162430
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,7 @@ yarn-error.log*
3939
junit.xml
4040

4141
*.tsbuildinfo
42+
43+
/.pnp.js
44+
/.yarn/
45+
!/.yarn/releases

.yarn/releases/yarn-1.21.1.js

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

.yarn/releases/yarn-berry.js

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

.yarnrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33

44

55
lastUpdateCheck 1576854265612
6-
yarn-path ".yarn/releases/yarn-1.21.1.js"
6+
yarn-path ".yarn/releases/yarn-berry.js"

package.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"@types/which": "^1.3.2",
1919
"@typescript-eslint/eslint-plugin": "^2.2.0",
2020
"@typescript-eslint/parser": "^2.2.0",
21+
"@yarnpkg/pnpify": "^2.0.0-rc.16",
2122
"ansi-regex": "^5.0.0",
2223
"ansi-styles": "^4.2.0",
2324
"babel-eslint": "^10.0.3",
@@ -64,6 +65,7 @@
6465
"mocha": "^7.0.0",
6566
"mock-fs": "^4.4.1",
6667
"opencollective": "^1.0.3",
68+
"pnp-webpack-plugin": "^1.6.0",
6769
"prettier": "^1.19.0",
6870
"prettylint": "^1.0.0",
6971
"progress": "^2.0.0",
@@ -146,5 +148,19 @@
146148
},
147149
"engines": {
148150
"node": ">= 8.3"
151+
},
152+
"dependenciesMeta": {
153+
"get-symbol-from-current-process-h": {
154+
"unplugged": true
155+
},
156+
"get-uv-event-loop-napi-h": {
157+
"unplugged": true
158+
},
159+
"node-addon-api": {
160+
"unplugged": true
161+
},
162+
"setimmediate-napi": {
163+
"unplugged": true
164+
}
149165
}
150166
}

scripts/browserBuild.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const path = require('path');
1010
const webpack = require('webpack');
1111
const camelCase = require('camelcase');
1212
const rimraf = require('rimraf');
13+
const PnpWebpackPlugin = require('pnp-webpack-plugin');
1314

1415
const transformOptions = require('../babel.config.js');
1516

@@ -65,11 +66,15 @@ function browserBuild(pkgName, entryPath, destination) {
6566
'../packages/expect/build/fakeChalk.js'
6667
),
6768
},
69+
plugins: [PnpWebpackPlugin],
6870
extensions: ['.js', '.json', '.ts'],
6971
},
7072
node: {
7173
fs: 'empty',
7274
},
75+
resolveLoader: {
76+
plugins: [PnpWebpackPlugin.moduleLoader(module)],
77+
},
7378
},
7479
/* eslint-enable */
7580
(err, stats) => {

scripts/buildTs.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,8 @@ const packagesWithTs = packages.filter(p =>
2121
);
2222

2323
const args = [
24-
'--max-old-space-size=4096',
25-
path.resolve(
26-
require.resolve('typescript/package.json'),
27-
'..',
28-
require('typescript/package.json').bin.tsc
29-
),
24+
'pnpify',
25+
'tsc',
3026
'-b',
3127
...packagesWithTs,
3228
...process.argv.slice(2),
@@ -35,7 +31,7 @@ const args = [
3531
console.log(chalk.inverse('Building TypeScript definition files'));
3632

3733
try {
38-
execa.sync('node', args, {stdio: 'inherit'});
34+
execa.sync('yarn', args, {stdio: 'inherit'});
3935
console.log(
4036
chalk.inverse.green('Successfully built TypeScript definition files')
4137
);

0 commit comments

Comments
 (0)