Skip to content

Commit

Permalink
infrastructure: update "engines" to node>=10.4
Browse files Browse the repository at this point in the history
  • Loading branch information
ljqx committed Dec 7, 2020
1 parent 3515f7e commit b58e895
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 12 deletions.
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 @@ -515,7 +515,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 @@ -635,7 +635,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 @@ -1101,7 +1101,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
3 changes: 2 additions & 1 deletion src/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"target": "ES5",
"module": "commonjs",
"noImplicitAny": false,
"strict": true
"strict": true,
"lib": ["ES2015"]
},
"files": [
"assert.ts",
Expand Down

0 comments on commit b58e895

Please sign in to comment.