Skip to content

Commit

Permalink
Merge branch 'dev' into stable
Browse files Browse the repository at this point in the history
# Conflicts:
#	packages/cli/bin.js
#	packages/create-webiny-project/utils/createProject.js
  • Loading branch information
Pavel910 committed Oct 24, 2023
2 parents 0b8c902 + c06ae38 commit 115054c
Show file tree
Hide file tree
Showing 13 changed files with 1,908 additions and 808 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/devPush.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
node: [14]
node: [16]
package: ${{ fromJson(needs.init.outputs.jest-packages) }}
runs-on: ${{ matrix.os }}
env:
Expand Down Expand Up @@ -354,7 +354,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
node: [14]
node: [16]
cypress-folder: ${{ fromJson(needs.e2e-wby-cms-ddb-init.outputs.cypress-folders) }}
runs-on: ubuntu-latest
environment: next
Expand Down Expand Up @@ -586,7 +586,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
node: [14]
node: [16]
cypress-folder: ${{ fromJson(needs.e2e-wby-cms-ddb-es-init.outputs.cypress-folders) }}
runs-on: ubuntu-latest
environment: next
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/nextPush.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
node: [14]
node: [16]
package: ${{ fromJson(needs.init.outputs.jest-packages) }}
runs-on: ${{ matrix.os }}
env:
Expand Down Expand Up @@ -354,7 +354,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
node: [14]
node: [16]
cypress-folder: ${{ fromJson(needs.e2e-wby-cms-ddb-init.outputs.cypress-folders) }}
runs-on: ubuntu-latest
environment: next
Expand Down Expand Up @@ -586,7 +586,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
node: [14]
node: [16]
cypress-folder: ${{ fromJson(needs.e2e-wby-cms-ddb-es-init.outputs.cypress-folders) }}
runs-on: ubuntu-latest
environment: next
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pullRequests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
node: [14]
node: [16]
package: ${{ fromJson(needs.init.outputs.jest-packages) }}
runs-on: ${{ matrix.os }}
# PRs from repo forks won't have access to these environment variables / secrets.
Expand Down Expand Up @@ -241,7 +241,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
node: [14]
node: [16]
runs-on: ${{ matrix.os }}
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pullRequestsCommandCypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
node: [14]
node: [16]
cypress-folder: ${{ fromJson(needs.e2e-wby-cms-ddb-init.outputs.cypress-folders) }}
runs-on: ubuntu-latest
environment: next
Expand Down Expand Up @@ -465,7 +465,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
node: [14]
node: [16]
cypress-folder: ${{ fromJson(needs.e2e-wby-cms-ddb-es-init.outputs.cypress-folders) }}
runs-on: ubuntu-latest
environment: next
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ schema.graphql
!.yarn/versions
.pnp.*
lerna.json
.stormTests

# TODO remove after moving traffic splitting config to WPC
gateway.*.json
768 changes: 0 additions & 768 deletions .yarn/releases/yarn-3.1.0.cjs

This file was deleted.

874 changes: 874 additions & 0 deletions .yarn/releases/yarn-3.6.4.cjs

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
compressionLevel: mixed

enableGlobalCache: false

nodeLinker: node-modules

packageExtensions:
Expand All @@ -23,4 +27,4 @@ plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"

yarnPath: .yarn/releases/yarn-3.1.0.cjs
yarnPath: .yarn/releases/yarn-3.6.4.cjs
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -230,5 +230,5 @@
"@lerna/[email protected]": "patch:@lerna/version@npm:3.22.1#.yarn/patches/@lerna-version-npm-3.22.1-97f4c3a7dd",
"@lerna/[email protected]": "patch:@lerna/publish@npm:3.22.1#.yarn/patches/@lerna-publish-npm-3.22.1-469707df67"
},
"packageManager": "yarn@3.2.1"
"packageManager": "yarn@3.6.4"
}
8 changes: 4 additions & 4 deletions packages/cli/bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ const currentNodeVersion = process.versions.node;

try {
const { stdout } = await execa("yarn", ["--version"]);
if (!semver.satisfies(stdout, ">=2")) {
console.error(chalk.red(`"@webiny/cli" requires yarn 2 or 3!`));
if (!semver.satisfies(stdout, ">=3")) {
console.error(chalk.red(`"@webiny/cli" requires yarn 3 or 4!`));
process.exit(1);
}
} catch (err) {
console.error(chalk.red(`"@webiny/cli" requires yarn 2 or 3!`));
console.error(chalk.red(`"@webiny/cli" requires yarn 3 or 4!`));
console.log(
`Run ${chalk.blue("yarn set version 3")} to install a compatible version of yarn.`
`Run ${chalk.blue("yarn set version berry")} to install a compatible version of yarn.`
);
process.exit(1);
}
Expand Down
874 changes: 874 additions & 0 deletions packages/create-webiny-project/utils/binaries/yarn-3.6.4.cjs

Large diffs are not rendered by default.

27 changes: 26 additions & 1 deletion packages/create-webiny-project/utils/createProject.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,34 @@ module.exports = async function createProject({
// Setup yarn
title: "Setup yarn",
task: async () => {
await execa("yarn", ["set", "version", "3"], { cwd: projectRoot });
const yarnVersion = "3.6.4";
const yarnFile = `yarn-${yarnVersion}.cjs`;
const yarnPath = `.yarn`;
const yarnReleasesPath = path.join(yarnPath, "releases");
const yarnReleasesFilePath = path.join(yarnReleasesPath, yarnFile);

/**
* We do not want to do the recursive directory creating as it might do something in parent directories which we do not want.
*/
const yarnReleaseFullPath = path.join(projectRoot, yarnReleasesPath);
fs.ensureDirSync(yarnReleaseFullPath);

const source = path.join(__dirname, path.join("binaries", yarnFile));
if (!fs.existsSync(source)) {
throw new Error(`No yarn binary source file: ${source}`);
}
const target = path.join(projectRoot, yarnReleasesFilePath);
fs.copyFileSync(source, target);

await execa("yarn", ["set", "version", yarnVersion], {
cwd: projectRoot
});

const yamlPath = path.join(projectRoot, ".yarnrc.yml");
if (!fs.existsSync(yamlPath)) {
fs.writeFileSync(yamlPath, `yarnPath: ${yarnReleasesFilePath}`, "utf-8");
}

const parsedYaml = yaml.load(fs.readFileSync(yamlPath, "utf-8"));

// Default settings are applied here. Currently we only apply the `nodeLinker` param.
Expand Down
Loading

0 comments on commit 115054c

Please sign in to comment.