Skip to content

Commit 1c2011d

Browse files
authored
chore: verify all packages have the same engine requirement (#9871)
1 parent bc1c684 commit 1c2011d

File tree

52 files changed

+143
-129
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+143
-129
lines changed

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ module.exports = {
132132
'**/__mocks__/**',
133133
'**/?(*.)(spec|test).js?(x)',
134134
'scripts/**',
135-
'eslintImportResolver.js',
135+
'babel.config.js',
136136
'testSetupFile.js',
137137
],
138138
},

babel.config.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8+
const semver = require('semver');
9+
const pkg = require('./package.json');
10+
11+
const supportedNodeVersion = semver.minVersion(pkg.engines.node).version;
12+
813
module.exports = {
914
babelrcRoots: ['examples/*'],
1015
// we don't wanna run the transforms in this file over react native
@@ -15,7 +20,7 @@ module.exports = {
1520
'babel-plugin-typescript-strip-namespaces',
1621
'babel-plugin-replace-ts-export-assignment',
1722
require.resolve(
18-
'./scripts/babel-plugin-jest-replace-ts-require-assignment.js'
23+
'./scripts/babel-plugin-jest-replace-ts-require-assignment.js',
1924
),
2025
],
2126
presets: ['@babel/preset-typescript'],
@@ -31,7 +36,7 @@ module.exports = {
3136
{
3237
exclude: ['@babel/plugin-proposal-dynamic-import'],
3338
shippedProposals: true,
34-
targets: {node: '8.3'},
39+
targets: {node: supportedNodeVersion},
3540
},
3641
],
3742
],
@@ -48,7 +53,7 @@ module.exports = {
4853
'@babel/preset-env',
4954
{
5055
shippedProposals: true,
51-
targets: {node: '8.3'},
56+
targets: {node: supportedNodeVersion},
5257
},
5358
],
5459
],

e2e/__tests__/__snapshots__/each.test.ts.snap

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ FAIL __tests__/failure.test.js
205205
28 | ({left, right}) => {
206206
> 29 | expect(left).toBe(right);
207207
| ^
208-
30 | }
208+
30 | },
209209
31 | );
210210
32 |
211211
@@ -222,7 +222,7 @@ FAIL __tests__/failure.test.js
222222
39 | ({left, right}) => {
223223
> 40 | expect(left).toBe(right);
224224
| ^
225-
41 | }
225+
41 | },
226226
42 | );
227227
43 |
228228
@@ -239,7 +239,7 @@ FAIL __tests__/failure.test.js
239239
39 | ({left, right}) => {
240240
> 40 | expect(left).toBe(right);
241241
| ^
242-
41 | }
242+
41 | },
243243
42 | );
244244
43 |
245245
@@ -256,7 +256,7 @@ FAIL __tests__/failure.test.js
256256
46 | word => {
257257
> 47 | expect(/z/.test(word)).toBe(true);
258258
| ^
259-
48 | }
259+
48 | },
260260
49 | );
261261
50 |
262262
@@ -273,7 +273,7 @@ FAIL __tests__/failure.test.js
273273
46 | word => {
274274
> 47 | expect(/z/.test(word)).toBe(true);
275275
| ^
276-
48 | }
276+
48 | },
277277
49 | );
278278
50 |
279279
@@ -290,7 +290,7 @@ FAIL __tests__/failure.test.js
290290
46 | word => {
291291
> 47 | expect(/z/.test(word)).toBe(true);
292292
| ^
293-
48 | }
293+
48 | },
294294
49 | );
295295
50 |
296296
@@ -308,7 +308,7 @@ FAIL __tests__/failure.test.js
308308
> 59 | expect(left).toBe(right);
309309
| ^
310310
60 | });
311-
61 | }
311+
61 | },
312312
62 | );
313313
314314
at Object.toBe (__tests__/failure.test.js:59:20)
@@ -325,7 +325,7 @@ FAIL __tests__/failure.test.js
325325
> 59 | expect(left).toBe(right);
326326
| ^
327327
60 | });
328-
61 | }
328+
61 | },
329329
62 | );
330330
331331
at Object.toBe (__tests__/failure.test.js:59:20)
@@ -342,7 +342,7 @@ FAIL __tests__/failure.test.js
342342
> 71 | expect(left).toBe(right);
343343
| ^
344344
72 | });
345-
73 | }
345+
73 | },
346346
74 | );
347347
348348
at Object.toBe (__tests__/failure.test.js:71:20)
@@ -359,7 +359,7 @@ FAIL __tests__/failure.test.js
359359
> 71 | expect(left).toBe(right);
360360
| ^
361361
72 | });
362-
73 | }
362+
73 | },
363363
74 | );
364364
365365
at Object.toBe (__tests__/failure.test.js:71:20)

e2e/__tests__/__snapshots__/errorOnDeprecated.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ FAIL __tests__/jasmine.objectContaining.test.js
138138
139139
9 | test('jasmine.objectContaining', () => {
140140
10 | expect({input: 'trash', output: 'trash'}).toEqual(
141-
> 11 | jasmine.objectContaining({output: 'trash'})
141+
> 11 | jasmine.objectContaining({output: 'trash'}),
142142
| ^
143143
12 | );
144144
13 | });

e2e/__tests__/__snapshots__/expectAsyncMatcher.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ FAIL __tests__/failure.test.js
7777
21 | it('fail with expected promise values and not', () =>
7878
> 22 | expect(Promise.resolve([1, 2])).resolves.not.toHaveLengthAsync(
7979
| ^
80-
23 | Promise.resolve(2)
80+
23 | Promise.resolve(2),
8181
24 | ));
8282
25 |
8383

e2e/__tests__/__snapshots__/toMatchInlineSnapshot.test.ts.snap

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ test('handles property matchers', () => {
7171
Object {
7272
"createdAt": Any<Date>,
7373
}
74-
\`
74+
\`,
7575
);
7676
});
7777
@@ -85,7 +85,7 @@ expect({createdAt: "string"}).toMatchInlineSnapshot(
8585
Object {
8686
"createdAt": Any<Date>,
8787
}
88-
\`
88+
\`,
8989
);
9090
});
9191
`;
@@ -98,7 +98,7 @@ test('handles property matchers', () => {
9898
Object {
9999
"createdAt": Any<Date>,
100100
}
101-
\`
101+
\`,
102102
);
103103
});
104104
@@ -112,7 +112,7 @@ test('handles property matchers', () => {
112112
Object {
113113
"createdAt": Any<String>,
114114
}
115-
\`
115+
\`,
116116
);
117117
});
118118
@@ -192,7 +192,7 @@ test('removes obsolete external snapshots', () => {
192192
exports[`supports async matchers 1`] = `
193193
test('inline snapshots', async () => {
194194
expect(Promise.resolve('success')).resolves.toMatchInlineSnapshot(
195-
\`"success"\`
195+
\`"success"\`,
196196
);
197197
expect(Promise.reject('fail')).rejects.toMatchInlineSnapshot(\`"fail"\`);
198198
});
@@ -221,7 +221,7 @@ expect.extend({
221221
createdAt: expect.any(Date),
222222
id: expect.any(Number),
223223
},
224-
...args
224+
...args,
225225
);
226226
},
227227
});
@@ -242,7 +242,7 @@ test('inline snapshots', () => {
242242
"id": Any<Number>,
243243
"name": "LeBron James",
244244
}
245-
\`
245+
\`,
246246
);
247247
expect(user).toMatchUserInlineSnapshot(\`
248248
Object {

e2e/__tests__/__snapshots__/toThrowErrorMatchingInlineSnapshot.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
exports[`should support rejecting promises 1`] = `
44
test('should support rejecting promises', async () => {
55
await expect(
6-
Promise.reject(new Error('octopus'))
6+
Promise.reject(new Error('octopus')),
77
).rejects.toThrowErrorMatchingInlineSnapshot(\`"octopus"\`);
88
});
99

e2e/coverage-handlebars/__tests__/greet.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ const greet = require('../greet.hbs');
88

99
test('am', () => {
1010
expect(greet({am: true, name: 'Joe'})).toEqual(
11-
'<p>Good\n morning\nJoe!</p>\n'
11+
'<p>Good\n morning\nJoe!</p>\n',
1212
);
1313
});

e2e/coverage-report/notRequiredInTestSuite.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
throw new Error(
99
`this error should not be a problem because` +
10-
`this file is never required or executed`
10+
`this file is never required or executed`,
1111
);
1212

1313
// Flow annotations to make sure istanbul can instrument non ES6 source

e2e/custom-test-sequencer/testSequencerAsync.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class CustomSequencer extends Sequencer {
1313
setTimeout(() => {
1414
const copyTests = Array.from(tests);
1515
resolve(
16-
copyTests.sort((testA, testB) => (testA.path > testB.path ? 1 : -1))
16+
copyTests.sort((testA, testB) => (testA.path > testB.path ? 1 : -1)),
1717
);
1818
}, 50);
1919
});

0 commit comments

Comments
 (0)