Skip to content

Commit 6ad73b7

Browse files
author
Burak Yigit Kaya
committed
Fix Webpack/Node module incompatibility
1 parent 3f8a973 commit 6ad73b7

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

bin/yarn.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ mkdirp.sync(constants.MODULE_CACHE_DIRECTORY);
3232

3333
module.exports = require(dirPath + '/cli');
3434

35-
const main = module.exports.default;
35+
// The `||` fallback is for Webpack/Node compatibility
36+
const main = module.exports.default || module.exports;
3637

3738
// ignore all arguments after a --
3839
const doubleDashIndex = process.argv.findIndex(element => element === '--');

circle.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,15 @@ test:
3131
- yarn lint
3232
- yarn test-ci -- -- --maxWorkers 3
3333
- yarn check-lockfile
34-
- yarn build-dist && yarn build-deb
34+
- yarn run build-dist
35+
- yarn run build-deb
3536
# Test that the standalone .js build works as expected
3637
- ./artifacts/yarn-`./dist/bin/yarn --version`.js --version
3738
- ./artifacts/yarn-legacy-`./dist/bin/yarn --version`.js --version
3839

3940
# Test that installing as root works and that it also works
4041
# behind a user namespace which Circle CI tests are run under
41-
- sudo env "PATH=$PATH" bin/yarn --force
42+
- sudo env "PATH=$PATH" bin/yarn install --force
4243

4344
deployment:
4445
release:

0 commit comments

Comments
 (0)