From 3212e138e3b141a8af6a19415401ab2c215cb789 Mon Sep 17 00:00:00 2001 From: Fila <38737958+filafb@users.noreply.github.com> Date: Thu, 1 Aug 2024 11:46:08 -0300 Subject: [PATCH] Update node version (#1231) * Run prettier to pass failing test * Update oclif config to use node 20 Ref: https://oclif.io/blog/2019/10/31/oclif-node-updates/\#packaged-node-version * Use node 20 in the cicd pipelines * Bump version * Update changelog * Bump version and update changelog --- .github/workflows/ci.yml | 4 ++-- .github/workflows/publish-prerelease-npm.yml | 2 +- .github/workflows/publish-stable-aws.yml | 2 +- .github/workflows/publish-stable-npm.yml | 2 +- CHANGELOG.md | 11 ++++++++--- package.json | 4 ++-- src/modules/apps/install.ts | 6 +++--- src/modules/apps/publish.ts | 4 ++-- src/modules/apps/unlink.ts | 4 ++-- 9 files changed, 22 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 52babb406..1c43cd38c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: - node-version: 12 + node-version: 20 - run: yarn install --ignore-scripts - run: yarn run ci:prettier-check - run: yarn run lint:node @@ -25,7 +25,7 @@ jobs: strategy: fail-fast: true matrix: - node-version: [12] + node-version: [20] os: [ubuntu-latest, windows-latest, macOS-latest] steps: diff --git a/.github/workflows/publish-prerelease-npm.yml b/.github/workflows/publish-prerelease-npm.yml index e8cac1527..89f9be76e 100644 --- a/.github/workflows/publish-prerelease-npm.yml +++ b/.github/workflows/publish-prerelease-npm.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: - node-version: 12 + node-version: 20 registry-url: https://registry.npmjs.org/ - run: yarn install --ignore-scripts - run: yarn build diff --git a/.github/workflows/publish-stable-aws.yml b/.github/workflows/publish-stable-aws.yml index a54edf9b5..27dbb2acf 100644 --- a/.github/workflows/publish-stable-aws.yml +++ b/.github/workflows/publish-stable-aws.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: - node-version: 12 + node-version: 20 registry-url: https://registry.npmjs.org/ - name: 'Install makensis (apt)' run: sudo apt update && sudo apt install -y nsis nsis-pluginapi diff --git a/.github/workflows/publish-stable-npm.yml b/.github/workflows/publish-stable-npm.yml index 392a5a642..14f741dae 100644 --- a/.github/workflows/publish-stable-npm.yml +++ b/.github/workflows/publish-stable-npm.yml @@ -11,7 +11,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: - node-version: 12 + node-version: 20 registry-url: https://registry.npmjs.org/ - name: Deploy on NPM run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index ccaaf44ed..bf5f7cb37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +## [4.1.0] - 2024-08-01 + +### Changed +- Pack toolbelt using nodejs 20 +- Allow specific builder config to override the common config for pinned dependencies + ## [4.0.5] - 2024-03-25 ### Fixed @@ -12,9 +20,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - handle OPTIONS request for CORS - update `publish-stable-aws` pipeline -### Changed -- Allow specific builder config to override the common config for pinned dependencies - ## [4.0.4] - 2023-11-03 ### Fixed diff --git a/package.json b/package.json index 1d318cb92..cf8ef0ed5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vtex", - "version": "4.0.5", + "version": "4.1.0", "description": "The platform for e-commerce apps", "bin": "bin/run", "main": "lib/api/index.js", @@ -178,7 +178,7 @@ ], "update": { "node": { - "version": "12.12.0" + "version": "20.16.0" }, "s3": { "bucket": "vtex-toolbelt-test" diff --git a/src/modules/apps/install.ts b/src/modules/apps/install.ts index f980fa0e5..b08a448a5 100644 --- a/src/modules/apps/install.ts +++ b/src/modules/apps/install.ts @@ -53,7 +53,7 @@ function handleAccountNotSponsoredByVendorError(app: string) { } const prepareInstall = async (appsList: string[], force: boolean): Promise => { - let exitWithError = false; + let exitWithError = false for (const app of appsList) { ManifestValidator.validateApp(app) @@ -81,7 +81,7 @@ const prepareInstall = async (appsList: string[], force: boolean): Promise } log.info(`Installed app ${chalk.green(app)} successfully`) } catch (e) { - exitWithError = true; + exitWithError = true if (isNotFoundError(e)) { log.warn( `Billing app not found in current workspace. Please install it with ${chalk.green( @@ -111,7 +111,7 @@ const prepareInstall = async (appsList: string[], force: boolean): Promise } } - if (exitWithError) process.exit(1); + if (exitWithError) process.exit(1) } export default async (optionalApps: string[], options) => { diff --git a/src/modules/apps/publish.ts b/src/modules/apps/publish.ts index 774f86868..f16c37636 100644 --- a/src/modules/apps/publish.ts +++ b/src/modules/apps/publish.ts @@ -111,8 +111,8 @@ const publisher = (workspace = 'master') => { ) } } catch (e) { - log.error(`Failed to publish ${appId}`); - process.exit(1); + log.error(`Failed to publish ${appId}`) + process.exit(1) } await returnToPreviousAccount({ previousAccount, previousWorkspace }) diff --git a/src/modules/apps/unlink.ts b/src/modules/apps/unlink.ts index a56fe69b6..dae6e0eaf 100644 --- a/src/modules/apps/unlink.ts +++ b/src/modules/apps/unlink.ts @@ -22,7 +22,7 @@ Make sure you typed the right app vendor, name and version.`) log.error(e.response.data.message) } } - process.exit(1); + process.exit(1) } } @@ -41,7 +41,7 @@ const unlinkAllApps = async (): Promise => { if (e?.response?.data?.message) { log.error(e.response.data.message) } - process.exit(1); + process.exit(1) } }