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

infrastructure: update "engines" to node>=10.9 #2058

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/codestyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 14.x

- run: npm ci
- run: npm run code-style
2 changes: 1 addition & 1 deletion .github/workflows/downstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: 10.x
node-version: 14.x
- run: npm ci
- run: npm test
- run: npm run downstream
2 changes: 1 addition & 1 deletion .github/workflows/ecma262suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: 10.x
node-version: 14.x
- run: npm ci
- run: npm test
- run: npm run test-262
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [8.x, 10.x, 12.x, 14.x]
node-version: [10.x, 12.x, 14.x]

steps:
- uses: actions/checkout@v2
Expand All @@ -23,7 +23,7 @@ jobs:
runs-on: macos-latest
strategy:
matrix:
node-version: [8.x, 10.x, 12.x, 14.x]
node-version: [10.x, 12.x, 14.x]

steps:
- uses: actions/checkout@v2
Expand All @@ -39,7 +39,7 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
node-version: [8.x, 10.x, 12.x, 14.x]
node-version: [10.x, 12.x, 14.x]

steps:
- run: git config --global core.autocrlf false
Expand All @@ -56,7 +56,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [6.x]
node-version: [8.x]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dist/esprima.js"
],
"engines": {
"node": ">=8"
"node": ">=10.9"
},
"author": {
"name": "Ariya Hidayat",
Expand Down
6 changes: 3 additions & 3 deletions src/scanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ export class Scanner {

// 3 digits are only allowed when string starts
// with 0, 1, 2, 3
if ('0123'.indexOf(ch) >= 0 && !this.eof() && Character.isOctalDigit(this.source.charCodeAt(this.index))) {
if ('0123'.includes(ch) && !this.eof() && Character.isOctalDigit(this.source.charCodeAt(this.index))) {
code = code * 8 + octalValue(this.source[this.index++]);
}
}
Expand Down Expand Up @@ -661,7 +661,7 @@ export class Scanner {

// 1-character punctuators.
str = this.source[this.index];
if ('<>=!+-*%&|^/'.indexOf(str) >= 0) {
if ('<>=!+-*%&|^/'.includes(str)) {
++this.index;
}
}
Expand Down Expand Up @@ -1136,7 +1136,7 @@ export class Scanner {
const astralSubstitute = '\uFFFF';
let tmp = pattern;

if (flags.indexOf('u') >= 0) {
if (flags.includes('u')) {
tmp = tmp
// Replace every Unicode escape sequence with the equivalent
// BMP character or a constant ASCII code point in the case of
Expand Down
5 changes: 3 additions & 2 deletions src/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"compilerOptions": {
"target": "ES5",
"target": "ES6",
"module": "commonjs",
"noImplicitAny": false,
"strict": true
"strict": true,
"lib": ["ES2015"]
},
"files": [
"assert.ts",
Expand Down