Skip to content

Commit a0f7aa1

Browse files
authored
Test against node 15 (#1138)
* Test against node 15 * Avoid npm v7 when running against node 15 * fix npm downgrade logic * Fix error message detection regexp for node 15 * Removing accidentally-committed local code * remove debug logging
1 parent 5a90aac commit a0f7aa1

File tree

2 files changed

+32
-2
lines changed

2 files changed

+32
-2
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,23 +39,30 @@ jobs:
3939
fail-fast: false
4040
matrix:
4141
os: [ubuntu, windows]
42-
flavor: [1, 2, 3, 4, 5, 6, 7, 8, 9]
42+
# Don't forget to add all new flavors to this list!
43+
flavor: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
4344
include:
45+
# Node 10
4446
- flavor: 1
4547
node: 10
4648
nodeFlag: 10
4749
typescript: latest
4850
typescriptFlag: latest
51+
# Node 12.15
4952
- flavor: 2
5053
node: 12.15
5154
nodeFlag: 12_15
5255
typescript: latest
5356
typescriptFlag: latest
57+
# Node 12.16
58+
# TODO Add comments about why we test 2.15 and 2.16; I think git blame says it's because of an ESM behavioral change that happened at this version number
59+
# TODO switch to '12' to get latest patch?
5460
- flavor: 3
5561
node: 12.16
5662
nodeFlag: 12_16
5763
typescript: latest
5864
typescriptFlag: latest
65+
# Node 13
5966
- flavor: 4
6067
node: 13
6168
nodeFlag: 13
@@ -71,6 +78,7 @@ jobs:
7178
nodeFlag: 13
7279
typescript: next
7380
typescriptFlag: next
81+
# Node 14
7482
- flavor: 7
7583
node: 14
7684
nodeFlag: 14
@@ -86,6 +94,25 @@ jobs:
8694
nodeFlag: 14
8795
typescript: next
8896
typescriptFlag: next
97+
# Node 15
98+
- flavor: 10
99+
node: 15
100+
nodeFlag: 15
101+
typescript: latest
102+
typescriptFlag: latest
103+
downgradeNpm: true
104+
- flavor: 11
105+
node: 15
106+
nodeFlag: 15
107+
typescript: 2.7
108+
typescriptFlag: 2_7
109+
downgradeNpm: true
110+
- flavor: 12
111+
node: 15
112+
nodeFlag: 15
113+
typescript: next
114+
typescriptFlag: next
115+
downgradeNpm: true
89116
steps:
90117
# checkout code
91118
- uses: actions/checkout@v2
@@ -95,6 +122,9 @@ jobs:
95122
with:
96123
node-version: ${{ matrix.node }}
97124
# lint, build, test
125+
# Downgrade from npm 7 to 6 because 7 still seems buggy to me
126+
- if: ${{ matrix.downgradeNpm }}
127+
run: npm install -g npm@6
98128
- run: npm install
99129
- run: npm run build-nopack
100130
- name: Download package artifact

src/index.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@ describe('ts-node', function () {
926926
}, function (err, stdout, stderr) {
927927
expect(err).to.not.equal(null)
928928
// expect error from node's default resolver
929-
expect(stderr).to.match(/Error \[ERR_UNSUPPORTED_ESM_URL_SCHEME\]:.*\n *at defaultResolve/)
929+
expect(stderr).to.match(/Error \[ERR_UNSUPPORTED_ESM_URL_SCHEME\]:.*(?:\n.*){0,1}\n *at defaultResolve/)
930930
return done()
931931
})
932932
})

0 commit comments

Comments
 (0)