-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #746 from heroku/da/detect-yarn2
Detect Yarn2 and give error message
- Loading branch information
Showing
16 changed files
with
14,702 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bash | ||
|
||
YQ="$BP_DIR/etc/vendor/yq-$(get_os)" | ||
|
||
detect_yarn2() { | ||
local uses_yarn="$1" | ||
local build_dir="$2" | ||
local yml_metadata | ||
local version | ||
|
||
yml_metadata=$($YQ r "$build_dir/yarn.lock" __metadata 2>&1) | ||
|
||
# grep for version in case the output is a parsing error | ||
version=$(echo "$yml_metadata" | grep version) | ||
|
||
if [[ "$uses_yarn" == "true" && "$version" != "" ]]; then | ||
echo "true" | ||
else | ||
echo "false" | ||
fi | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"name": "yarn-2-without-cache", | ||
"version": "1.0.0", | ||
"main": "index.js", | ||
"license": "MIT", | ||
"engines": { | ||
"yarn": "1.x" | ||
}, | ||
"dependencies": { | ||
"lodash": "^4.16.4" | ||
}, | ||
"devDependencies": { | ||
"debug": "^4.1.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# This file is generated by running "yarn install" inside your project. | ||
# Manual changes might be lost - proceed with caution! | ||
|
||
__metadata: | ||
version: 4 | ||
|
||
"debug@npm:^4.1.1": | ||
version: 4.1.1 | ||
resolution: "debug@npm:4.1.1" | ||
dependencies: | ||
ms: ^2.1.1 | ||
checksum: e3bfa1544ced80ac5764aa313530150af442e5ce53f91090f00e3aff33a8b535ce60a7502d1451b3cbc2b9cd6994b3a08a38fbd3ff7a2ec801ad79d8b457b8e8 | ||
languageName: node | ||
linkType: hard | ||
|
||
"lodash@npm:^4.16.4": | ||
version: 4.17.15 | ||
resolution: "lodash@npm:4.17.15" | ||
checksum: b018ec8d4c95f14a4b57005a247eca1bc25639322939471a1958d3bc721b4f18e90edb6ea564854593a8bc1f94956a0352cf0cd372991b98c42d61c0cd11e5a3 | ||
languageName: node | ||
linkType: hard | ||
|
||
"ms@npm:^2.1.1": | ||
version: 2.1.2 | ||
resolution: "ms@npm:2.1.2" | ||
checksum: 2a3d955e5199024d4b18630ff47c21b52703a5e892615ae233486b8108f26b5493736009754263eebae765ab79d6e20327dad6e52d7843b689d404245e286549 | ||
languageName: node | ||
linkType: hard | ||
|
||
"yarn-2-without-cache@workspace:.": | ||
version: 0.0.0-use.local | ||
resolution: "yarn-2-without-cache@workspace:." | ||
dependencies: | ||
debug: ^4.1.1 | ||
lodash: ^4.16.4 | ||
languageName: unknown | ||
linkType: soft |
Oops, something went wrong.