From 8825c6dd11c3217a20f9c62f2f5e74cce0273ef7 Mon Sep 17 00:00:00 2001 From: Volodymyr Kolesnykov Date: Tue, 4 Jun 2024 14:51:49 +0300 Subject: [PATCH 1/5] fix(dev-env): demo code is displayed as `[demo-image]` --- src/lib/dev-environment/dev-environment-cli.ts | 8 ++++---- src/lib/dev-environment/dev-environment-core.ts | 6 ++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/lib/dev-environment/dev-environment-cli.ts b/src/lib/dev-environment/dev-environment-cli.ts index 4dab86e87..db02791a6 100644 --- a/src/lib/dev-environment/dev-environment-cli.ts +++ b/src/lib/dev-environment/dev-environment-cli.ts @@ -231,7 +231,7 @@ interface LocalComponent { interface ImageComponent { mode: 'image'; - tag: string; + tag: string | undefined; } export function processComponentOptionInput( @@ -258,7 +258,7 @@ export function processComponentOptionInput( return { mode: 'image', - tag: param, + tag: param === 'demo' ? undefined : param, }; } @@ -412,10 +412,10 @@ async function processWordPress( let result: WordPressConfig; const allowLocal = false; const defaultObject = defaultValue - ? processComponentOptionInput( defaultValue, allowLocal ) + ? ( processComponentOptionInput( defaultValue, allowLocal ) as WordPressConfig ) : null; if ( preselectedValue ) { - result = processComponentOptionInput( preselectedValue, allowLocal ); + result = processComponentOptionInput( preselectedValue, allowLocal ) as WordPressConfig; } else { result = await promptForWordPress( defaultObject ); } diff --git a/src/lib/dev-environment/dev-environment-core.ts b/src/lib/dev-environment/dev-environment-core.ts index 5c590baef..a91d2d1b7 100644 --- a/src/lib/dev-environment/dev-environment-core.ts +++ b/src/lib/dev-environment/dev-environment-core.ts @@ -305,6 +305,12 @@ function parseComponentForInfo( component: ComponentConfig | WordPressConfig ): if ( component.mode === 'local' ) { return component.dir ?? ''; } + + // Environments created by the old code will have `component.tag` set to `demo` instead of `undefined`. + if ( component.tag === 'demo' ) { + component.tag = undefined; + } + return component.tag ?? '[demo-image]'; } From 8175f7dbafafd8149a872f61ed39befcc0e7a63d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Jun 2024 12:43:44 +0000 Subject: [PATCH 2/5] build(deps-dev): bump @types/node from 18.19.33 to 18.19.34 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.19.33 to 18.19.34. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- npm-shrinkwrap.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 46507185e..36396dd4e 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -3856,9 +3856,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.19.33", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.33.tgz", - "integrity": "sha512-NR9+KrpSajr2qBVp/Yt5TU/rp+b5Mayi3+OlMlcg2cVCfRmcG5PWZ7S4+MG9PZ5gWBoc9Pd0BKSRViuBCRPu0A==", + "version": "18.19.34", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.34.tgz", + "integrity": "sha512-eXF4pfBNV5DAMKGbI02NnDtWrQ40hAN558/2vvS4gMpMIxaf6JmD7YjnZbq0Q9TDSSkKBamime8ewRoomHdt4g==", "dependencies": { "undici-types": "~5.26.4" } @@ -16174,9 +16174,9 @@ "dev": true }, "@types/node": { - "version": "18.19.33", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.33.tgz", - "integrity": "sha512-NR9+KrpSajr2qBVp/Yt5TU/rp+b5Mayi3+OlMlcg2cVCfRmcG5PWZ7S4+MG9PZ5gWBoc9Pd0BKSRViuBCRPu0A==", + "version": "18.19.34", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.34.tgz", + "integrity": "sha512-eXF4pfBNV5DAMKGbI02NnDtWrQ40hAN558/2vvS4gMpMIxaf6JmD7YjnZbq0Q9TDSSkKBamime8ewRoomHdt4g==", "requires": { "undici-types": "~5.26.4" } From 9d62b621660905d8b1be8ad6987b9a977c9149ec Mon Sep 17 00:00:00 2001 From: WordPress VIP Bot <22917138+wpcomvip-bot@users.noreply.github.com> Date: Wed, 5 Jun 2024 06:09:08 +0000 Subject: [PATCH 3/5] chore: bump package version to v3.0.0 --- npm-shrinkwrap.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 36396dd4e..ea30c46d0 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -1,12 +1,12 @@ { "name": "@automattic/vip", - "version": "2.39.8-dev.0", + "version": "3.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@automattic/vip", - "version": "2.39.8-dev.0", + "version": "3.0.0", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 133bc6cba..47f5cb2e4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@automattic/vip", - "version": "2.39.8-dev.0", + "version": "3.0.0", "description": "The VIP Javascript library & CLI", "main": "index.js", "bin": { From a72d0d5f2d3a8a88b3a7a2fc64e75a26543a84bf Mon Sep 17 00:00:00 2001 From: WordPress VIP Bot <22917138+wpcomvip-bot@users.noreply.github.com> Date: Wed, 5 Jun 2024 06:11:22 +0000 Subject: [PATCH 4/5] chore: bump to next preminor: (v3.1.0-dev.0) --- npm-shrinkwrap.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index ea30c46d0..065650595 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -1,12 +1,12 @@ { "name": "@automattic/vip", - "version": "3.0.0", + "version": "3.1.0-dev.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@automattic/vip", - "version": "3.0.0", + "version": "3.1.0-dev.0", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 47f5cb2e4..21e25c145 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@automattic/vip", - "version": "3.0.0", + "version": "3.1.0-dev.0", "description": "The VIP Javascript library & CLI", "main": "index.js", "bin": { From b212e0cfd07ced219f3a9e272af80086cb666307 Mon Sep 17 00:00:00 2001 From: Aagam Shah Date: Wed, 5 Jun 2024 11:45:32 +0530 Subject: [PATCH 5/5] Update CHANGELOG.md --- docs/CHANGELOG.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 7d5915a89..7891e25cb 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,5 +1,20 @@ ## Changelog +### 3.0.0 + +* fix(dev-env): demo code is displayed as `[demo-image]` +* build(deps-dev): bump @types/node from 18.19.33 to 18.19.34 +* build(deps): bump debug from 4.3.4 to 4.3.5 +* ci: remove duplicate check +* Update the dev-env commands to follow the VIP-CLI style guide +* build(deps-dev): bump the babel group with 4 updates +* ci: add publish prerelease workflow +* build(deps): bump step-security/harden-runner from 2.7.1 to 2.8.0 +* build(deps): bump ini from 4.1.2 to 4.1.3 +* Integrate media import v2 flow and expand on media import error report messaging + +**Full Changelog**: https://github.com/Automattic/vip-cli/compare/2.39.7...3.0.0 + ### 2.39.7 * Fix promptForBoolean to display the default initial value capitalized