From e6b10b1666f4e003e3b1e270121d41970e3c805b Mon Sep 17 00:00:00 2001 From: Bernie Reiter Date: Tue, 13 Apr 2021 22:44:00 +0200 Subject: [PATCH 1/4] Scripts: Include YAML files in prettification --- bin/test-create-block.sh | 4 +- docs/how-to-guides/platform/README.md | 2 +- package.json | 5 +- packages/create-block/CHANGELOG.md | 4 + packages/create-block/README.md | 4 +- .../create-block/lib/init-package-json.js | 2 +- packages/create-block/lib/init-wp-scripts.js | 2 +- packages/create-block/lib/scaffold.js | 4 +- packages/scripts/CHANGELOG.md | 2 + packages/scripts/README.md | 14 +- packages/scripts/scripts/format-js.js | 136 ++++-------------- packages/scripts/scripts/format.js | 116 +++++++++++++++ 12 files changed, 169 insertions(+), 126 deletions(-) create mode 100644 packages/scripts/scripts/format.js diff --git a/bin/test-create-block.sh b/bin/test-create-block.sh index 6b1ea6842f9094..b6e22fdb42031b 100755 --- a/bin/test-create-block.sh +++ b/bin/test-create-block.sh @@ -25,8 +25,8 @@ status "Scaffolding block..." npx wp-create-block esnext-test --no-wp-scripts cd esnext-test -status "Formatting JavaScript files..." -../node_modules/.bin/wp-scripts format-js +status "Formatting files..." +../node_modules/.bin/wp-scripts format status "Building block..." ../node_modules/.bin/wp-scripts build diff --git a/docs/how-to-guides/platform/README.md b/docs/how-to-guides/platform/README.md index d46ce8ea4ba0a0..c6d85fa6d12fc0 100644 --- a/docs/how-to-guides/platform/README.md +++ b/docs/how-to-guides/platform/README.md @@ -43,7 +43,7 @@ You can then add a scripts section to your package.json file, for example: ```json "scripts": { "build": "wp-scripts build", - "format:js": "wp-scripts format-js", + "format": "wp-scripts format", "lint:js": "wp-scripts lint-js", "start": "wp-scripts start" } diff --git a/package.json b/package.json index a3fe29b9993fa1..40a671fb0c0e4b 100644 --- a/package.json +++ b/package.json @@ -229,6 +229,7 @@ "fixtures:clean": "rimraf \"packages/e2e-tests/fixtures/blocks/*.+(json|serialized.html)\"", "fixtures:generate": "cross-env GENERATE_MISSING_FIXTURES=y npm run test-unit", "fixtures:regenerate": "npm run fixtures:clean && npm run fixtures:generate", + "format": "wp-scripts format", "format-js": "wp-scripts format-js", "format-php": "wp-env run composer run-script format", "lint": "concurrently \"npm run lint-lockfile\" \"npm run lint-js\" \"npm run lint-pkg-json\" \"npm run lint-css\"", @@ -291,8 +292,8 @@ "*.scss": [ "wp-scripts lint-style" ], - "*.{js,ts,tsx}": [ - "wp-scripts format-js", + "*.{js,ts,tsx,yml}": [ + "wp-scripts format", "wp-scripts lint-js" ], "{docs/{toc.json,tool/*.js},packages/{*/README.md,components/src/*/**/README.md}}": [ diff --git a/packages/create-block/CHANGELOG.md b/packages/create-block/CHANGELOG.md index f80c07c56306c1..77637a9d04a3b9 100644 --- a/packages/create-block/CHANGELOG.md +++ b/packages/create-block/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Breaking Changes + +- Rename `format:js` script to `format` ([#30240](https://github.com/WordPress/gutenberg/pull/30240)). + ### Enhancement - Updated `.editorconfig` template files to work with automatic file formatting ([#30794](https://github.com/WordPress/gutenberg/pull/30794)). diff --git a/packages/create-block/README.md b/packages/create-block/README.md index 4f302a967256cf..dade5e0e4169ef 100644 --- a/packages/create-block/README.md +++ b/packages/create-block/README.md @@ -90,10 +90,10 @@ $ npm run build Builds the code for production. [Learn more](/packages/scripts#build). ```bash -$ npm run format:js +$ npm run format ``` -Formats JavaScript files. [Learn more](/packages/scripts#format-js). +Formats files. [Learn more](/packages/scripts#format). ```bash $ npm run lint:css diff --git a/packages/create-block/lib/init-package-json.js b/packages/create-block/lib/init-package-json.js index 8c2ede2bc3dca9..31c376e4aa5f2b 100644 --- a/packages/create-block/lib/init-package-json.js +++ b/packages/create-block/lib/init-package-json.js @@ -37,7 +37,7 @@ module.exports = async ( { main: wpScripts && 'build/index.js', scripts: wpScripts && { build: 'wp-scripts build', - 'format:js': 'wp-scripts format-js', + format: 'wp-scripts format', 'lint:css': 'wp-scripts lint-style', 'lint:js': 'wp-scripts lint-js', start: 'wp-scripts start', diff --git a/packages/create-block/lib/init-wp-scripts.js b/packages/create-block/lib/init-wp-scripts.js index fa1eba8862d3e4..ca0101957f47f1 100644 --- a/packages/create-block/lib/init-wp-scripts.js +++ b/packages/create-block/lib/init-wp-scripts.js @@ -22,7 +22,7 @@ module.exports = async ( { slug } ) => { info( '' ); info( 'Formatting JavaScript files.' ); - await command( 'npm run format:js', { + await command( 'npm run format', { cwd, } ); diff --git a/packages/create-block/lib/scaffold.js b/packages/create-block/lib/scaffold.js index 40dd41dfe3c6dc..f761b63aa23515 100644 --- a/packages/create-block/lib/scaffold.js +++ b/packages/create-block/lib/scaffold.js @@ -118,8 +118,8 @@ module.exports = async ( code( ' $ npm run build' ); info( ' Builds the code for production.' ); info( '' ); - code( ' $ npm run format:js' ); - info( ' Formats JavaScript files.' ); + code( ' $ npm run format' ); + info( ' Formats files.' ); info( '' ); code( ' $ npm run lint:css' ); info( ' Lints CSS files.' ); diff --git a/packages/scripts/CHANGELOG.md b/packages/scripts/CHANGELOG.md index a28da1cdecea5e..f928b4c2bc8a40 100644 --- a/packages/scripts/CHANGELOG.md +++ b/packages/scripts/CHANGELOG.md @@ -4,6 +4,8 @@ ### Breaking Changes +- Rename `format-js` script to `format` ([#30240](https://github.com/WordPress/gutenberg/pull/30240)). +- Include YAML files when formatting files with `format` ([#30240](https://github.com/WordPress/gutenberg/pull/30240)). - The bundled `css-loader` dependency has been updated from requiring `^3.5.2` to requiring `^5.1.3` ([#27821](https://github.com/WordPress/gutenberg/pull/27821)). - The bundled `mini-css-extract-plugin` dependency has been updated from requiring `^0.9.0` to requiring `^1.3.9` ([#27821](https://github.com/WordPress/gutenberg/pull/27821)). - The bundled `postcss-loader` dependency has been updated from requiring `^3.0.0` to requiring `^4.2.0` ([#27821](https://github.com/WordPress/gutenberg/pull/27821)). diff --git a/packages/scripts/README.md b/packages/scripts/README.md index bd1d8b480873fd..d53d0c60c9dd0a 100644 --- a/packages/scripts/README.md +++ b/packages/scripts/README.md @@ -30,7 +30,7 @@ _Example:_ "build": "wp-scripts build", "check-engines": "wp-scripts check-engines", "check-licenses": "wp-scripts check-licenses", - "format:js": "wp-scripts format-js", + "format": "wp-scripts format", "lint:css": "wp-scripts lint-style", "lint:js": "wp-scripts lint-js", "lint:md:docs": "wp-scripts lint-md-docs", @@ -128,7 +128,7 @@ _Flags_: - `--gpl2`: Validates against [GPLv2 license compatibility](https://www.gnu.org/licenses/license-list.en.html) - `--ignore=a,b,c`: A comma-separated set of package names to ignore for validation. This is intended to be used primarily in cases where a dependency’s `license` field is malformed. It’s assumed that any `ignored` package argument would be manually vetted for compatibility by the project owner. -### `format-js` +### `format` It helps to enforce coding style guidelines for your JavaScript files by formatting source code in a consistent way. @@ -137,18 +137,18 @@ _Example:_ ```json { "scripts": { - "format:js": "wp-scripts format-js", - "format:js:src": "wp-scripts format-js ./src" + "format": "wp-scripts format", + "format:src": "wp-scripts format ./src" } } ``` This is how you execute the script with presented setup: -- `npm run format:js` - formats JavaScript files in the entire project’s directories. -- `npm run format:js:src` - formats JavaScript files in the project’s `src` subfolder’s directories. +- `npm run format` - formats files in the entire project’s directories. +- `npm run format:src` - formats files in the project’s `src` subfolder’s directories. -When you run commands similar to the `npm run format:js:src` example above, you can provide a file, a directory, or `glob` syntax or any combination of them. +When you run commands similar to the `npm run format:src` example above, you can provide a file, a directory, or `glob` syntax or any combination of them. By default, files located in `build`, `node_modules`, and `vendor` folders are ignored. diff --git a/packages/scripts/scripts/format-js.js b/packages/scripts/scripts/format-js.js index 55a040e1d9355e..06dd2cbcb8b9d7 100644 --- a/packages/scripts/scripts/format-js.js +++ b/packages/scripts/scripts/format-js.js @@ -1,116 +1,36 @@ -/** - * External dependencies - */ -const { exit, stdout } = require( 'process' ); - /** * External dependencies */ const chalk = require( 'chalk' ); -const { sync: spawn } = require( 'cross-spawn' ); -const { sync: resolveBin } = require( 'resolve-bin' ); -const { sync: dirGlob } = require( 'dir-glob' ); -const { sync: readPkgUp } = require( 'read-pkg-up' ); /** * Internal dependencies */ -const { - fromConfigRoot, - fromProjectRoot, - getArgFromCLI, - getFileArgsFromCLI, - hasArgInCLI, - hasPrettierConfig, - hasProjectFile, -} = require( '../utils' ); - -// Check if the project has wp-prettier installed and if the project has a Prettier config -function checkPrettier() { - try { - const prettierResolvePath = require.resolve( 'prettier' ); - const prettierPackageJson = readPkgUp( { cwd: prettierResolvePath } ); - const prettierPackageName = prettierPackageJson.pkg.name; - - if ( - ! [ 'wp-prettier', '@wordpress/prettier' ].includes( - prettierPackageName - ) - ) { - return { - success: false, - message: - chalk.red( - 'Incompatible version of Prettier was found in your project\n' - ) + - "You need to install the 'wp-prettier' package to get " + - 'code formatting compliant with the WordPress coding standards.\n\n', - }; - } - } catch { - return { - success: false, - message: - chalk.red( - "The 'prettier' package was not found in your project\n" - ) + - "You need to install the 'wp-prettier' package under an alias to get " + - 'code formatting compliant with the WordPress coding standards.\n\n', - }; - } - - return { success: true }; -} - -const checkResult = checkPrettier(); -if ( ! checkResult.success ) { - stdout.write( checkResult.message ); - exit( 1 ); -} - -// Check for existing config in project, if it exists no command-line args are -// needed for config, otherwise pass in args to default config in packages -// See: https://prettier.io/docs/en/configuration.html -let configArgs = []; -if ( ! hasPrettierConfig() ) { - configArgs = [ - '--config', - require.resolve( '@wordpress/prettier-config' ), - ]; -} - -// If `--ignore-path` is not explicitly specified, use the project's or global .eslintignore -let ignorePath = getArgFromCLI( '--ignore-path' ); -if ( ! ignorePath ) { - if ( hasProjectFile( '.eslintignore' ) ) { - ignorePath = fromProjectRoot( '.eslintignore' ); - } else { - ignorePath = fromConfigRoot( '.eslintignore' ); - } -} -const ignoreArgs = [ '--ignore-path', ignorePath ]; - -// forward the --require-pragma option that formats only files that already have the @format -// pragma in the first docblock. -const pragmaArgs = hasArgInCLI( '--require-pragma' ) - ? [ '--require-pragma' ] - : []; - -// Get the files and directories to format and convert them to globs -let fileArgs = getFileArgsFromCLI(); -if ( fileArgs.length === 0 ) { - fileArgs = [ '.' ]; -} - -// Converts `foo/bar` directory to `foo/bar/**/*.js` -const globArgs = dirGlob( fileArgs, { - extensions: [ 'js', 'jsx', 'ts', 'tsx' ], -} ); - -const result = spawn( - resolveBin( 'prettier' ), - [ '--write', ...configArgs, ...ignoreArgs, ...pragmaArgs, ...globArgs ], - { stdio: 'inherit' } -); - -process.exit( result.status ); +const { getNodeArgsFromCLI, spawnScript } = require( '../utils' ); + +const { scriptArgs, nodeArgs } = getNodeArgsFromCLI(); + +const keypress = async () => { + process.stdin.setRawMode( true ); + return new Promise( ( resolve ) => + process.stdin.once( 'data', () => { + process.stdin.setRawMode( false ); + resolve(); + } ) + ); +}; + +( async () => { + const message = + `Please note that the ${ chalk.red( + 'format-js' + ) } script has been renamed to ${ chalk.green( 'format' ) }.\n` + + "If you're calling it from any of your own scripts, please update them accordingly.\n" + + 'Press any key to continiue.'; + + // eslint-disable-next-line no-console + console.log( message ); + + await keypress(); + spawnScript( 'format', scriptArgs, nodeArgs ); +} )(); diff --git a/packages/scripts/scripts/format.js b/packages/scripts/scripts/format.js new file mode 100644 index 00000000000000..6dd655bdab7019 --- /dev/null +++ b/packages/scripts/scripts/format.js @@ -0,0 +1,116 @@ +/** + * External dependencies + */ +const { exit, stdout } = require( 'process' ); + +/** + * External dependencies + */ +const chalk = require( 'chalk' ); +const { sync: spawn } = require( 'cross-spawn' ); +const { sync: resolveBin } = require( 'resolve-bin' ); +const { sync: dirGlob } = require( 'dir-glob' ); +const { sync: readPkgUp } = require( 'read-pkg-up' ); + +/** + * Internal dependencies + */ +const { + fromConfigRoot, + fromProjectRoot, + getArgFromCLI, + getFileArgsFromCLI, + hasArgInCLI, + hasPrettierConfig, + hasProjectFile, +} = require( '../utils' ); + +// Check if the project has wp-prettier installed and if the project has a Prettier config +function checkPrettier() { + try { + const prettierResolvePath = require.resolve( 'prettier' ); + const prettierPackageJson = readPkgUp( { cwd: prettierResolvePath } ); + const prettierPackageName = prettierPackageJson.pkg.name; + + if ( + ! [ 'wp-prettier', '@wordpress/prettier' ].includes( + prettierPackageName + ) + ) { + return { + success: false, + message: + chalk.red( + 'Incompatible version of Prettier was found in your project\n' + ) + + "You need to install the 'wp-prettier' package to get " + + 'code formatting compliant with the WordPress coding standards.\n\n', + }; + } + } catch { + return { + success: false, + message: + chalk.red( + "The 'prettier' package was not found in your project\n" + ) + + "You need to install the 'wp-prettier' package under an alias to get " + + 'code formatting compliant with the WordPress coding standards.\n\n', + }; + } + + return { success: true }; +} + +const checkResult = checkPrettier(); +if ( ! checkResult.success ) { + stdout.write( checkResult.message ); + exit( 1 ); +} + +// Check for existing config in project, if it exists no command-line args are +// needed for config, otherwise pass in args to default config in packages +// See: https://prettier.io/docs/en/configuration.html +let configArgs = []; +if ( ! hasPrettierConfig() ) { + configArgs = [ + '--config', + require.resolve( '@wordpress/prettier-config' ), + ]; +} + +// If `--ignore-path` is not explicitly specified, use the project's or global .eslintignore +let ignorePath = getArgFromCLI( '--ignore-path' ); +if ( ! ignorePath ) { + if ( hasProjectFile( '.eslintignore' ) ) { + ignorePath = fromProjectRoot( '.eslintignore' ); + } else { + ignorePath = fromConfigRoot( '.eslintignore' ); + } +} +const ignoreArgs = [ '--ignore-path', ignorePath ]; + +// forward the --require-pragma option that formats only files that already have the @format +// pragma in the first docblock. +const pragmaArgs = hasArgInCLI( '--require-pragma' ) + ? [ '--require-pragma' ] + : []; + +// Get the files and directories to format and convert them to globs +let fileArgs = getFileArgsFromCLI(); +if ( fileArgs.length === 0 ) { + fileArgs = [ '.' ]; +} + +// Converts `foo/bar` directory to `foo/bar/**/*.js` +const globArgs = dirGlob( fileArgs, { + extensions: [ 'js', 'jsx', 'ts', 'tsx', 'yml', 'yaml' ], +} ); + +const result = spawn( + resolveBin( 'prettier' ), + [ '--write', ...configArgs, ...ignoreArgs, ...pragmaArgs, ...globArgs ], + { stdio: 'inherit' } +); + +process.exit( result.status ); From ef547fa117d6e24c5e54c8d344469a8602f0520c Mon Sep 17 00:00:00 2001 From: Bernie Reiter Date: Tue, 13 Apr 2021 22:46:19 +0200 Subject: [PATCH 2/4] Move create-block's Changelog entry to Enhancement --- packages/create-block/CHANGELOG.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/create-block/CHANGELOG.md b/packages/create-block/CHANGELOG.md index 77637a9d04a3b9..ad8ecd0ea57b00 100644 --- a/packages/create-block/CHANGELOG.md +++ b/packages/create-block/CHANGELOG.md @@ -2,12 +2,9 @@ ## Unreleased -### Breaking Changes - -- Rename `format:js` script to `format` ([#30240](https://github.com/WordPress/gutenberg/pull/30240)). - ### Enhancement +- Rename `format:js` script to `format` ([#30240](https://github.com/WordPress/gutenberg/pull/30240)). - Updated `.editorconfig` template files to work with automatic file formatting ([#30794](https://github.com/WordPress/gutenberg/pull/30794)). ## 2.2.0 (2021-04-06) From 6909ad6b57bf14d84fac0b84ba591906ece152a6 Mon Sep 17 00:00:00 2001 From: Bernie Reiter Date: Wed, 14 Apr 2021 12:19:40 +0200 Subject: [PATCH 3/4] Small doc tweak MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Greg Ziółkowski --- packages/scripts/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/scripts/README.md b/packages/scripts/README.md index d53d0c60c9dd0a..ea507e8625c1d3 100644 --- a/packages/scripts/README.md +++ b/packages/scripts/README.md @@ -130,7 +130,7 @@ _Flags_: ### `format` -It helps to enforce coding style guidelines for your JavaScript files by formatting source code in a consistent way. +It helps to enforce coding style guidelines for your files (JavaScript, YAML) by formatting source code in a consistent way. _Example:_ From 8b2b2dddc621ecd701e63dcd5f97de2ceebea731 Mon Sep 17 00:00:00 2001 From: Bernie Reiter Date: Wed, 14 Apr 2021 18:05:22 +0200 Subject: [PATCH 4/4] Fix indendation in YAML files --- .github/workflows/bundle-size.yml | 2 +- .github/workflows/create-block.yml | 2 +- .github/workflows/end2end-test.yml | 2 +- .github/workflows/pull-request-automation.yml | 2 +- .github/workflows/rnmobile-android-runner.yml | 2 +- .github/workflows/rnmobile-ios-runner.yml | 2 +- .github/workflows/static-checks.yml | 2 +- .github/workflows/storybook-pages.yml | 2 +- .github/workflows/unit-test.yml | 6 +++--- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/bundle-size.yml b/.github/workflows/bundle-size.yml index 16a32deba10e3d..f6111b9fb49324 100644 --- a/.github/workflows/bundle-size.yml +++ b/.github/workflows/bundle-size.yml @@ -15,7 +15,7 @@ jobs: - name: Use Node.js 14.x uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5 with: - node-version: 14.x + node-version: 14.x - uses: preactjs/compressed-size-action@7d87f60a6b0c7d193b8183ce859ed00b356ea92f # v2.1.0 with: diff --git a/.github/workflows/create-block.yml b/.github/workflows/create-block.yml index 167dcd061c0a84..435c418a86139a 100644 --- a/.github/workflows/create-block.yml +++ b/.github/workflows/create-block.yml @@ -20,7 +20,7 @@ jobs: - name: Use Node.js ${{ matrix.node }}.x uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5 with: - node-version: ${{ matrix.node }} + node-version: ${{ matrix.node }} - name: Cache node modules uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4 diff --git a/.github/workflows/end2end-test.yml b/.github/workflows/end2end-test.yml index c029ea67d2289d..9552175c283ff6 100644 --- a/.github/workflows/end2end-test.yml +++ b/.github/workflows/end2end-test.yml @@ -24,7 +24,7 @@ jobs: - name: Use Node.js 14.x uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5 with: - node-version: 14.x + node-version: 14.x - name: Cache node modules uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4 diff --git a/.github/workflows/pull-request-automation.yml b/.github/workflows/pull-request-automation.yml index 46274e7b414484..6c84669f3e3905 100644 --- a/.github/workflows/pull-request-automation.yml +++ b/.github/workflows/pull-request-automation.yml @@ -17,7 +17,7 @@ jobs: - name: Use Node.js 14.x uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5 with: - node-version: 14.x + node-version: 14.x # Changing into the action's directory and running `npm install` is much # faster than a full project-wide `npm ci`. diff --git a/.github/workflows/rnmobile-android-runner.yml b/.github/workflows/rnmobile-android-runner.yml index a247dc6aa35d7d..6fa1009201bc6b 100644 --- a/.github/workflows/rnmobile-android-runner.yml +++ b/.github/workflows/rnmobile-android-runner.yml @@ -19,7 +19,7 @@ jobs: - name: Use Node.js 14.x uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5 with: - node-version: 14.x + node-version: 14.x - name: Restore npm cache uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4 diff --git a/.github/workflows/rnmobile-ios-runner.yml b/.github/workflows/rnmobile-ios-runner.yml index 56503aa72edf71..36584173a0ccad 100644 --- a/.github/workflows/rnmobile-ios-runner.yml +++ b/.github/workflows/rnmobile-ios-runner.yml @@ -19,7 +19,7 @@ jobs: - name: Use Node.js 14.x uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5 with: - node-version: 14.x + node-version: 14.x - name: Restore npm cache uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4 diff --git a/.github/workflows/static-checks.yml b/.github/workflows/static-checks.yml index 26c56de20ac881..ba66847963df72 100644 --- a/.github/workflows/static-checks.yml +++ b/.github/workflows/static-checks.yml @@ -19,7 +19,7 @@ jobs: - name: Use Node.js 14.x uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5 with: - node-version: 14.x + node-version: 14.x - name: Cache node modules uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4 diff --git a/.github/workflows/storybook-pages.yml b/.github/workflows/storybook-pages.yml index 5d9de94c4267b5..50eb5351225bf8 100644 --- a/.github/workflows/storybook-pages.yml +++ b/.github/workflows/storybook-pages.yml @@ -17,7 +17,7 @@ jobs: - name: Use Node.js 14.x uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5 with: - node-version: 14.x + node-version: 14.x - name: Cache node modules uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4 diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 6af3ad7d7cc7da..b1d0bb6278bb42 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -24,7 +24,7 @@ jobs: - name: Use Node.js ${{ matrix.node }}.x uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5 with: - node-version: ${{ matrix.node }} + node-version: ${{ matrix.node }} - name: Cache node modules uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4 @@ -60,7 +60,7 @@ jobs: - name: Use Node.js 14.x uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5 with: - node-version: 14.x + node-version: 14.x - name: Cache node modules uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4 @@ -102,7 +102,7 @@ jobs: - name: Use Node.js 14.x uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5 with: - node-version: 14.x + node-version: 14.x - name: Cache node modules uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4