Skip to content

Commit

Permalink
Require Node 14 (#847)
Browse files Browse the repository at this point in the history
  • Loading branch information
ecraig12345 authored May 2, 2023
1 parent 18b92bf commit 57c3fae
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 18 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ on:
push:
branches: [master]

env:
nodeVersion: 12
concurrency:
group: pr-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
Expand All @@ -33,10 +34,10 @@ jobs:
- name: Check out code
uses: actions/checkout@v3

- name: Set up Node.js ${{ env.nodeVersion }}
- name: Install Node.js from .nvmrc
uses: actions/setup-node@v3
with:
node-version: ${{ env.nodeVersion }}
node-version-file: .nvmrc

# Guarantee a predictable version of npm for the first round of tests
- name: Install package managers
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ on:

env:
npmVersion: 8
nodeVersion: 12

jobs:
build:
Expand All @@ -28,10 +27,10 @@ jobs:
# Don't save creds in the git config (so it's easier to override later)
persist-credentials: false

- name: Set up Node.js ${{ env.nodeVersion }}
- name: Install Node.js from .nvmrc
uses: actions/setup-node@v3
with:
node-version: ${{ env.nodeVersion }}
node-version-file: .nvmrc

# Guarantee a predictable version of npm (the PR build tests against both 6 and 8)
- name: Install package managers
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
14
7 changes: 7 additions & 0 deletions change/beachball-c7cd357b-0728-4477-91af-0dbc7035011a.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "**BREAKING CHANGE**: Require Node 14. This is released as a minor change because Node 12 has been past end of life for a year now.",
"packageName": "beachball",
"email": "[email protected]",
"dependentChangeType": "patch"
}
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@
"beachball": "./bin/beachball.js"
},
"engines": {
"node": ">=12.0.0"
"node": ">=14.0.0"
},
"files": [
"bin",
"lib/!(__*)"
"lib/!(__*)",
"lib/!(__*)/**/*"
],
"scripts": {
"build": "tsc",
Expand Down Expand Up @@ -58,7 +59,7 @@
"@types/fs-extra": "^9.0.13",
"@types/lodash": "^4.14.191",
"@types/minimatch": "^3.0.5",
"@types/node": "^12.20.55",
"@types/node": "^14.0.0",
"@types/prompts": "^2.4.2",
"@types/semver": "^7.3.13",
"@types/tmp": "^0.2.3",
Expand Down
4 changes: 2 additions & 2 deletions src/__fixtures__/mockStdin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class MockStdin extends stream.Readable {
* Send text in a way that's presumably intended to simulate real `process.stdin` input
* (this approach is copied from `mock-stdin`).
*/
send(text: string[] | Buffer | string | null, encoding?: string) {
send(text: string[] | Buffer | string | null, encoding?: BufferEncoding) {
if (Array.isArray(text)) {
if (encoding) {
throw new TypeError('Cannot invoke MockStdin#send(): `encoding` specified while text specified as an array.');
Expand Down Expand Up @@ -153,7 +153,7 @@ class MockData {
pos = 0;
done = false;

constructor(private data: Buffer | string | null, public encoding?: string) {}
constructor(private data: Buffer | string | null, public encoding?: BufferEncoding) {}

get length() {
if (Buffer.isBuffer(this.data)) {
Expand Down
5 changes: 3 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"compilerOptions": {
"outDir": "./lib",
// compatible with node 12 https://kangax.github.io/compat-table/es2016plus/#node12_11
"target": "ES2019",
// compatible with node 14
"target": "ES2020",
"module": "commonjs",
"moduleResolution": "node",
"declaration": true,
Expand All @@ -15,6 +15,7 @@
"allowJs": true,
"checkJs": true,
"skipLibCheck": true,
"lib": ["ES2020"],
"types": ["node"]
},
"include": ["src/**/*"]
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1459,10 +1459,10 @@
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.5.tgz#1001cc5e6a3704b83c236027e77f2f58ea010f40"
integrity sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==

"@types/node@*", "@types/node@^12.20.55":
version "12.20.55"
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240"
integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==
"@types/node@*", "@types/node@^14.0.0":
version "14.18.43"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.43.tgz#679e000d9f1d914132ea295b4a1ffdf20370ec49"
integrity sha512-n3eFEaoem0WNwLux+k272P0+aq++5o05bA9CfiwKPdYPB5ZambWKdWoeHy7/OJiizMhzg27NLaZ6uzjLTzXceQ==

"@types/parse-json@^4.0.0":
version "4.0.0"
Expand Down

0 comments on commit 57c3fae

Please sign in to comment.