Skip to content

Commit c44a362

Browse files
committed
berry
1 parent 6694e4f commit c44a362

File tree

9 files changed

+20998
-162496
lines changed

9 files changed

+20998
-162496
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/unplugged/
45+
/.yarn/build-state.yml

.yarn/releases/yarn-1.21.1.js

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

.yarn/releases/yarn-rc.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"

.yarnrc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
yarnPath: .yarn/releases/yarn-rc.js
2+
enableGlobalCache: true

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
"mocha": "^7.0.0",
6767
"mock-fs": "^4.4.1",
6868
"opencollective": "^1.0.3",
69+
"pnp-webpack-plugin": "^1.6.0",
6970
"prettier": "^1.19.0",
7071
"prettylint": "^1.0.0",
7172
"progress": "^2.0.0",

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: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,7 @@ 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+
'tsc',
3025
'-b',
3126
...packagesWithTs,
3227
...process.argv.slice(2),
@@ -35,7 +30,7 @@ const args = [
3530
console.log(chalk.inverse('Building TypeScript definition files'));
3631

3732
try {
38-
execa.sync('node', args, {stdio: 'inherit'});
33+
execa.sync('yarn', args, {stdio: 'inherit'});
3934
console.log(
4035
chalk.inverse.green('Successfully built TypeScript definition files')
4136
);

yarn.lock

Lines changed: 20925 additions & 15173 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)