-
Notifications
You must be signed in to change notification settings - Fork 121
node: Support yarn berry #494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
0b79c40 to
2ad4303
Compare
|
|
|
Should this also generate a For example, for [
{
"type": "file",
"url": "https://repo.yarnpkg.com/4.12.0/packages/yarnpkg-cli/bin/yarn.js",
"sha512": "f45ab632439a67f8bc759bf32ead036a1f413287b9042726b7cc4818b7b49e14e9423ba49b18f9e06ea4941c1ad062385b1d8760a8d5091a1a31e5f6219afca8",
"dest-filename": "yarn.js",
"dest": "flatpak-node/corepack-home/v1/yarn/4.12.0"
},
{
"type": "inline",
"contents": "{\"locator\":{\"name\":\"yarn\",\"reference\":\"4.12.0\"},\"bin\":[\"yarn\",\"yarnpkg\"],\"hash\":\"sha512.f45ab632439a67f8bc759bf32ead036a1f413287b9042726b7cc4818b7b49e14e9423ba49b18f9e06ea4941c1ad062385b1d8760a8d5091a1a31e5f6219afca8\"}",
"dest-filename": ".corepack",
"dest": "flatpak-node/corepack-home/v1/yarn/4.12.0"
},
{
"type": "shell",
"commands": [
"mkdir -- \"flatpak-node/corepack-shims\"",
"ln -sT -- \"$(command -v corepack)\" \"flatpak-node/corepack-shims/corepack\"",
"printf 'Running: %s\\n' \"flatpak-node/corepack-shims/corepack --version\"; COREPACK_HOME=\"${PWD:?}/flatpak-node/corepack-home\" COREPACK_ENABLE_NETWORK=\"0\" PATH=\"${PWD:?}/flatpak-node/corepack-shims${PATH:+:${PATH:?}}\" corepack --version",
"printf 'Running: %s\\n' \"flatpak-node/corepack-shims/corepack enable\"; COREPACK_HOME=\"${PWD:?}/flatpak-node/corepack-home\" COREPACK_ENABLE_NETWORK=\"0\" PATH=\"${PWD:?}/flatpak-node/corepack-shims${PATH:+:${PATH:?}}\" corepack enable"
]
},
{
"type": "script",
"commands": [
"set -eu",
"printf 'Running(flatpak-node): %s\\n' \"flatpak-node/corepack-shims/corepack install\"; COREPACK_HOME=\"${PWD:?}/flatpak-node/corepack-home\" COREPACK_ENABLE_NETWORK=\"0\" PATH=\"${PWD:?}/flatpak-node/corepack-shims${PATH:+:${PATH:?}}\" corepack install",
"printf 'Running(flatpak-node): %s\\n' \"yarn --version\"; yarn --version",
"printf 'Running(flatpak-node): %s\\n' \"yarn config set enableNetwork false\"; yarn config set enableNetwork false",
"printf 'Running(flatpak-node): %s\\n' \"yarn config set enableOfflineMode true\"; yarn config set enableOfflineMode true",
"printf 'Running(flatpak-node): %s\\n' \"yarn config set globalFolder -- '${FLATPAK_BUILDER_BUILDDIR:?}/flatpak-node/yarn-berry'\"; yarn config set globalFolder -- \"${FLATPAK_BUILDER_BUILDDIR:?}/flatpak-node/yarn-berry\"",
"printf 'Running(flatpak-node): %s\\n' \"yarn plugin import -- '${FLATPAK_BUILDER_BUILDDIR:?}/flatpak-node/flatpak-yarn.js'\"; yarn plugin import \"${FLATPAK_BUILDER_BUILDDIR:?}/flatpak-node/flatpak-yarn.js\"",
"printf 'Running(flatpak-node): %s\\n' \"yarn convertToZip\"; yarn convertToZip \"${FLATPAK_BUILDER_BUILDDIR:?}/flatpak-node/corepack-home/v1/yarn/4.12.0/yarn.js\""
],
"dest": "flatpak-node"
}
]The consuming package can then include a source like: - type: script
commands:
- "set -eu"
- "printf 'Running: %s\\n' \"./flatpak-node/autogen.sh\"; ./flatpak-node/autogen.sh"And, if using the I don't think |
|
Maybe another pr, as it's not only for yarn berry. |
No description provided.