Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: update to node v16 with npm v6 for packaging #4092

Merged
merged 15 commits into from
May 10, 2022
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ parameters:
default: '3.13.1'
node-version:
type: string
default: '14.16.0'
default: '16.13.0'
# Constants
cache-version:
type: string
Expand Down Expand Up @@ -382,7 +382,7 @@ jobs:
command: |
[xml]$results = Get-Content junit-aggregate.xml
$failure = $results.SelectSingleNode("//failure")
if ($failure -ne $null) {
if ($failure -ne $null) {
Write-Host "Forcing build failure due to test failure(s) :'("
$host.SetShouldExit(1)
}
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/create-release-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ on:
jobs:
create_branch:
name: 'Create Branch'

runs-on: ubuntu-latest

steps:
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: '14.16.x'
node-version: '16.13.x'
- name: Checkout
uses: actions/checkout@v2.0.0
with:
Expand Down Expand Up @@ -43,4 +43,3 @@ jobs:
# -H 'Authorization: Bearer ${{ secrets.SLACK_BOT_TOKEN }}' \
# -X POST -d "${{ github.event.client_payload.on_success }}" \
# https://slack.com/api/chat.update

11 changes: 8 additions & 3 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#save exact versions of dependencies from the package.json
# https://docs.npmjs.com/cli/v8/using-npm/config

# Save dependencies to package.json with an exact version rather than using npm's default semver range operator
save-exact=true

#enforces usage of the minimum node version in our .nvmrc
engine-strict=true
# Refuse to install (or even consider installing) any package that claims to not be compatible with the current Node.js version.
engine-strict=true

# Smaller on disk than lockfile version 2, but not interoperable with older npm versions. Ideal if all users are on npm version 7 and higher.
lockfile-version=3
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v14.16.0
v16.13.0
12 changes: 9 additions & 3 deletions contributing/developing.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

## Pre-requisites

1. We are requiring Node 14 at a minimum. If you need to work with multiple versions of Node, you
might consider using [nvm](https://github.com/creationix/nvm).
1. We are requiring Node 16 at a minimum. If you need to work with multiple versions of Node, you might consider using [nvm](https://github.com/creationix/nvm).
1. npm v6 is declared as a dependency in the workspace root and gets used by vsce packaging due to [issues with vsce packaging and npm v7/8](https://github.com/forcedotcom/salesforcedx-vscode/pull/4092)
1. npm v8 that comes installed with node 16 would be used when npm is invoked via npm run scripts or manually via shell. Hence the new lock file format of npm v8 with workspaces support is used by `npm install`.
mohanraj-r marked this conversation as resolved.
Show resolved Hide resolved
1. This repository uses [Lerna](https://lernajs.io/) to manage it as a
_monorepo_. Please install Lerna globally using `npm install --global lerna`.
1. We use `tslint` so please install it using `npm install --global tslint`.
Expand Down Expand Up @@ -200,6 +201,11 @@ This runs [check-peer-dependencies](https://www.npmjs.com/package/check-peer-dep

Add any missing peer dependencies identified to the package's dev dependency.

### `npm run vsix:install`
This finds VSIX packages built locally (using `npm run vscode:package`) and installs them to Visual Studio Code Insiders.
- The installation would overwrite any installed packages in insiders with same name and version (under `~/.vscode-insiders/extensions`).
- To debug installed extensions you can use Command Palette: `Developer > Show Logs .. > Extension Host`

## Node Configuration

### .npmrc
Expand All @@ -208,4 +214,4 @@ The npmrc allows for project-level [configuration](https://docs.npmjs.com/cli/v8

### .nvmrc

Our nvmrc specifies the minimimum node version required to run the project.
Our nvmrc specifies the minimum node version required to run the project.
Loading