Skip to content

Commit

Permalink
[PWA-2400] Update packages and dependencies (magento#3611)
Browse files Browse the repository at this point in the history
* PWA-2400 Update dependency - Part 1

* PWA-2400 Update dependencies - Part 2

* PWA-2400 Update dependencies Part 3

* PWA-2400 Update dependencies - Part 4

* PWA-2400 ESlint update

* PWA-2400 ESlint V7.32, V8.x to be done in another story.

* PWA-2400 Update Yargs

* PWA-2400 Put Jest to V26, which has less vulnerabilities and fix tests

* PWA-2400 Added missing yarn.lock from venia-integration

* Restore test that checks for required positional argument

* PWA-2400 Adjust graphql-config version to fix scaffold build error

* PWA-2400 Fix yarn watch:all visual issue

Co-authored-by: Revanth Kumar Annavarapu <[email protected]>
Co-authored-by: Tommy Wiebell <[email protected]>
Co-authored-by: Pedro Chiossi <[email protected]>
Co-authored-by: Devagouda <[email protected]>
Co-authored-by: Mikhaël Bois <[email protected]>
  • Loading branch information
6 people authored Jan 18, 2022
1 parent e40c973 commit 4e71fb8
Show file tree
Hide file tree
Showing 16 changed files with 1,291 additions and 928 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const config = {
'error',
{
ObjectTypeDefinition: 'PascalCase',
leadingUnderscore: 'allow'
allowLeadingUnderscore: true
}
],
'@graphql-eslint/require-id-when-available': 'error'
Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,20 @@
"devDependencies": {
"@babel/plugin-transform-runtime": "~7.4.4",
"@graphql-cli/validate": "~2.1.0",
"@graphql-eslint/eslint-plugin": "~1.0.1",
"@graphql-eslint/eslint-plugin": "~3.0.1",
"@magento/eslint-config": "~1.5.0",
"@types/jest": "~25.2.1",
"@types/jest": "~26.0.24",
"autoprefixer": "~10.3.3",
"babel-eslint": "~10.1.0",
"babel-plugin-dynamic-import-node": "~2.3.3",
"babel-plugin-graphql-tag": "~2.0.0",
"caller-id": "~0.1.0",
"chalk": "~2.4.2",
"chokidar": "~2.1.2",
"coveralls": "~3.0.3",
"danger": "^7.1.4",
"chokidar": "~3.5.2",
"coveralls": "~3.1.1",
"danger": "^10.7.1",
"dotenv": "~6.2.0",
"eslint": "~7.27.0",
"eslint": "~7.32.0",
"eslint-config-prettier": "~6.0.0",
"eslint-plugin-babel": "~5.3.0",
"eslint-plugin-jsx-a11y": "~6.4.1",
Expand All @@ -74,20 +74,20 @@
"first-run": "~2.0.0",
"graphql": "~15.5.0",
"graphql-cli": "~4.1.0",
"graphql-config": "~3.3.0",
"graphql-config": "~3.4.1",
"graphql-tag": "~2.12.4",
"identity-obj-proxy": "~3.0.0",
"jest": "~26.0.1",
"jest": "~26.6.3",
"jest-fetch-mock": "~2.1.1",
"jest-junit": "~10.0.0",
"jest-junit": "~13.0.0",
"jest-transform-graphql": "~2.1.0",
"lodash.debounce": "~4.0.8",
"prettier": "~1.16.4",
"rimraf": "~2.6.3",
"tailwindcss": "~2.2.7"
},
"optionalDependencies": {
"bundlesize": "~0.17.1",
"bundlesize": "~0.18.1",
"sharp": "~0.29.0"
},
"resolutions": {
Expand Down
2 changes: 1 addition & 1 deletion packages/create-pwa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"compression": "~1.7.4",
"execa": "^1.0.0",
"git-user-info": "^1.0.1",
"inquirer": "^6.3.1",
"inquirer": "^8.2.0",
"is-invalid-path": "^1.0.2",
"is-valid-npm-name": "^0.0.4",
"node-fetch": "~2.6.1",
Expand Down
6 changes: 3 additions & 3 deletions packages/pwa-buildpack/lib/WebpackTools/PWADevServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ const PWADevServer = {
url.port = detectedAddress.port;
}
let readyNotice = chalk.green(
`PWADevServer ready at ${chalk.greenBright.underline(
`PWADevServer ready at \n ${chalk.greenBright.underline(
url.href
)}`
);
if (graphqlPlayground) {
readyNotice +=
'\n' +
'\n\n' +
chalk.blueBright(
`GraphQL Playground ready at ${chalk.blueBright.underline(
new URL('/graphiql', url.origin).href
Expand All @@ -92,7 +92,7 @@ const PWADevServer = {
boxen(readyNotice, {
borderColor: 'gray',
float: 'center',
align: 'center',
textAlignment: 'center',
margin: 1,
padding: 1
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,13 @@ class UpwardIncludePlugin {

debug('assets collection complete, %O', this.assetMap);

new CopyPlugin(Object.values(this.assetMap), {
copyUnmodified: true,
logLevel: 'error'
}).apply(this.compiler);
new CopyPlugin(
{ patterns: Object.values(this.assetMap) },
{
copyUnmodified: true,
logLevel: 'error'
}
).apply(this.compiler);
}
async getDefinitions(directories, definitions = []) {
const dir = directories.shift();
Expand Down
15 changes: 13 additions & 2 deletions packages/pwa-buildpack/lib/__tests__/cli-create-project.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,20 @@ test('is a yargs builder', async () => {
);

expect(output).toMatch('Create a PWA');
});

test('throws when directory argument is missing', async () => {
const parser = yargs
.command({ ...createProjectCliBuilder, handler: jest.fn() })
.help();

// throws because it wants a positional argument--just checking
expect(() => createProjectCliBuilder.builder(yargs)).toThrow('positional');
const output = await new Promise(resolve =>
parser.parse('create-project', err => resolve(err))
);

expect(output).toMatchInlineSnapshot(
`[YError: Not enough non-option arguments: got 0, need at least 1]`
);
});

test('locates builtin package', async () => {
Expand Down
10 changes: 5 additions & 5 deletions packages/pwa-buildpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@
"dependencies": {
"@magento/directive-parser": "~0.1.7",
"@magento/upward-js": "~5.2.0",
"@pmmmwh/react-refresh-webpack-plugin": "~0.4.1",
"@pmmmwh/react-refresh-webpack-plugin": "~0.4.3",
"@yarnpkg/lockfile": "~1.1.0",
"apicache": "~1.4.0",
"boxen": "~3.0.0",
"boxen": "~5.1.2",
"camelspace": "~1.0.0",
"chalk": "~2.4.2",
"copy-webpack-plugin": "~5.0.3",
"copy-webpack-plugin": "~6.4.0",
"debug": "~4.3.1",
"devcert": "~1.1.1",
"dotenv": "~6.2.0",
"enhanced-resolve": "~4.1.1",
"envalid": "~4.2.2",
"envalid": "~6.0.1",
"errorhandler": "~1.5.1",
"execa": "~1.0.0",
"figures": "~2.0.0",
Expand Down Expand Up @@ -69,7 +69,7 @@
"webpack-virtual-modules": "~0.3.1",
"word-wrap": "~1.2.3",
"write-file-webpack-plugin": "~4.5.0",
"yargs": "~13.2.2"
"yargs": "~17.3.0"
},
"devDependencies": {
"@babel/core": "~7.15.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/venia-concept/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
"workbox-webpack-plugin": "~6.2.4"
},
"optionalDependencies": {
"sharp": "~0.29.0"
"sharp": "~0.29.3"
},
"engines": {
"node": ">=14.x",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { createTestInstance } from '@magento/peregrine';
import Options from '../options';

jest.mock('../../../classify');
jest.mock('uuid/v4', () => () => '00000000-0000-0000-0000-000000000000');
jest.mock('uuid', () => () => '00000000-0000-0000-0000-000000000000');

const defaultProps = {
options: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Swatch from '../swatch';
import Icon from '../../Icon';

jest.mock('../../../classify');
jest.mock('uuid/v4', () => () => '00000000-0000-0000-0000-000000000000');
jest.mock('uuid', () => () => '00000000-0000-0000-0000-000000000000');

const defaultProps = {
item: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import testRenderer from 'react-test-renderer';
import SwatchList from '../swatchList';

jest.mock('../../../classify');
jest.mock('uuid/v4', () => () => '00000000-0000-0000-0000-000000000000');
jest.mock('uuid', () => () => '00000000-0000-0000-0000-000000000000');

const defaultProps = {
items: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import testRenderer from 'react-test-renderer';
import Tile from '../tile';

jest.mock('../../../classify');
jest.mock('uuid/v4', () => () => '00000000-0000-0000-0000-000000000000');
jest.mock('uuid', () => () => '00000000-0000-0000-0000-000000000000');

const defaultProps = {
item: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import testRenderer from 'react-test-renderer';
import TileList from '../tileList';

jest.mock('../../../classify');
jest.mock('uuid/v4', () => () => '00000000-0000-0000-0000-000000000000');
jest.mock('uuid', () => () => '00000000-0000-0000-0000-000000000000');

const defaultProps = {
items: [
Expand Down
2 changes: 1 addition & 1 deletion venia-integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
"jimp": "~0.16.1",
"mochawesome": "~6.2.2",
"mochawesome-merge": "~4.2.0",
"yargs": "~17.2.1"
"yargs": "~17.3.0"
}
}
48 changes: 24 additions & 24 deletions venia-integration-tests/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1142,10 +1142,10 @@ ansi-regex@^4.1.0:
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997"
integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==

ansi-regex@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75"
integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==
ansi-regex@^5.0.0, ansi-regex@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304"
integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==

ansi-styles@^2.2.1:
version "2.2.1"
Expand Down Expand Up @@ -5271,14 +5271,14 @@ string-width@^3.0.0, string-width@^3.1.0:
is-fullwidth-code-point "^2.0.0"
strip-ansi "^5.1.0"

string-width@^4.1.0, string-width@^4.2.0:
version "4.2.2"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.2.tgz#dafd4f9559a7585cfba529c6a0a4f73488ebd4c5"
integrity sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==
string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.0"
strip-ansi "^6.0.1"

string_decoder@~1.1.1:
version "1.1.1"
Expand Down Expand Up @@ -5308,12 +5308,12 @@ strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0:
dependencies:
ansi-regex "^4.1.0"

strip-ansi@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532"
integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.0"
ansi-regex "^5.0.1"

strip-bom@^4.0.0:
version "4.0.0"
Expand Down Expand Up @@ -5944,10 +5944,10 @@ yargs-parser@^18.1.2:
camelcase "^5.0.0"
decamelize "^1.2.0"

yargs-parser@^20.2.2:
version "20.2.9"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee"
integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==
yargs-parser@^21.0.0:
version "21.0.0"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.0.0.tgz#a485d3966be4317426dd56bdb6a30131b281dc55"
integrity sha512-z9kApYUOCwoeZ78rfRYYWdiU/iNL6mwwYlkkZfJoyMR1xps+NEBX5X7XmRpxkZHhXJ6+Ey00IwKxBBSW9FIjyA==

yargs-parser@^9.0.2:
version "9.0.2"
Expand Down Expand Up @@ -6007,18 +6007,18 @@ yargs@^15.3.1, yargs@^15.4.1:
y18n "^4.0.0"
yargs-parser "^18.1.2"

yargs@~17.2.1:
version "17.2.1"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.2.1.tgz#e2c95b9796a0e1f7f3bf4427863b42e0418191ea"
integrity sha512-XfR8du6ua4K6uLGm5S6fA+FIJom/MdJcFNVY8geLlp2v8GYbOXD4EB1tPNZsRn4vBzKGMgb5DRZMeWuFc2GO8Q==
yargs@~17.3.0:
version "17.3.0"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.3.0.tgz#295c4ffd0eef148ef3e48f7a2e0f58d0e4f26b1c"
integrity sha512-GQl1pWyDoGptFPJx9b9L6kmR33TGusZvXIZUT+BOz9f7X2L94oeAskFYLEg/FkhV06zZPBYLvLZRWeYId29lew==
dependencies:
cliui "^7.0.2"
escalade "^3.1.1"
get-caller-file "^2.0.5"
require-directory "^2.1.1"
string-width "^4.2.0"
string-width "^4.2.3"
y18n "^5.0.5"
yargs-parser "^20.2.2"
yargs-parser "^21.0.0"

yauzl@^2.10.0:
version "2.10.0"
Expand Down
Loading

0 comments on commit 4e71fb8

Please sign in to comment.