File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,8 @@ references:
27
27
nodejs_versions :
28
28
- &nodejs_current "14.19"
29
29
- &nodejs_next "16.14"
30
- - &nodejs_experimental "18.13"
30
+ # nodejs 19.3 comes with npm 9.0, which breaks "npm config set python" below
31
+ - &nodejs_experimental "19.2"
31
32
32
33
nodejs_enum : &nodejs_enum
33
34
type : enum
Original file line number Diff line number Diff line change @@ -267,9 +267,14 @@ describe('build', () => {
267
267
. then ( makeSureItFails ( ) )
268
268
. catch ( ( error ) => {
269
269
assert . instanceOf ( error , UsageError ) ;
270
+ // Matching error messages from either Node.js < 19 or Node.js >= 19
271
+ // Node.js 19.0 includes V8 10.7 [1], and the latter includes changes to make JSON.parse errors user-friendly
272
+ // [1] https://github.com/nodejs/node/pull/44741
273
+ // [2] https://chromium-review.googlesource.com/c/v8/v8/+/3513684
274
+ // [3] https://chromium-review.googlesource.com/c/v8/v8/+/3652254
270
275
assert . match (
271
276
error . message ,
272
- / U n e x p e c t e d s t r i n g i n J S O N a t p o s i t i o n 1 4 /
277
+ / U n e x p e c t e d s t r i n g i n J S O N a t p o s i t i o n 1 4 | E x p e c t e d ' : ' a f t e r p r o p e r t y n a m e i n J S O N a t p o s i t i o n 1 4 /
273
278
) ;
274
279
assert . match ( error . message , / ^ E r r o r p a r s i n g m e s s a g e s \. j s o n / ) ;
275
280
assert . include ( error . message , messageFileName ) ;
Original file line number Diff line number Diff line change @@ -68,9 +68,11 @@ describe('util/manifest', () => {
68
68
error . message ,
69
69
/ E r r o r p a r s i n g m a n i f e s t \. j s o n f i l e a t /
70
70
) ;
71
- assert . include (
71
+ // Matching error messages from either Node.js < 19 or Node.js >= 19
72
+ // See comments in tests/unit/test-cmd/test.build.js
73
+ assert . match (
72
74
error . message ,
73
- ' Unexpected token "," (0x2C) in JSON at position 51'
75
+ / U n e x p e c t e d t o k e n " , " \ (0 x 2 C \ ) i n J S O N a t p o s i t i o n 5 1 | E x p e c t e d d o u b l e - q u o t e d p r o p e r t y n a m e i n J S O N a t p o s i t i o n 5 1 /
74
76
) ;
75
77
assert . include ( error . message , manifestFile ) ;
76
78
} )
You can’t perform that action at this time.
0 commit comments