Skip to content

Commit 3ab57aa

Browse files
committed
change all targets to es2020
1 parent 4aaafeb commit 3ab57aa

File tree

26 files changed

+52
-276
lines changed

26 files changed

+52
-276
lines changed

config/tsconfig.base.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
"strict": true,
77
"lib": [
88
"dom",
9-
"es2017",
9+
"es2020",
1010
"esnext.WeakRef",
1111
],
1212
"module": "ES2015",
1313
"moduleResolution": "node",
1414
"resolveJsonModule": true,
1515
"esModuleInterop": true,
1616
"sourceMap": true,
17-
"target": "es2017",
17+
"target": "es2020",
1818
"typeRoots": [
1919
"../node_modules/@types"
2020
],

config/webpack.test.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ module.exports = {
4444
options: {
4545
compilerOptions: {
4646
module: 'commonjs',
47-
target: 'es2017',
47+
target: 'es2020',
4848
downlevelIteration: true,
4949
resolveJsonModule: true
5050
}
@@ -56,15 +56,6 @@ module.exports = {
5656
use: 'source-map-loader',
5757
enforce: 'pre'
5858
},
59-
{
60-
test: /\.tsx?$/,
61-
use: {
62-
loader: 'istanbul-instrumenter-loader',
63-
options: { esModules: true }
64-
},
65-
enforce: 'post',
66-
exclude: [/\.test\.ts$/, /\btest(ing)?\//]
67-
},
6859
{
6960
test: /\.js$/,
7061
include: [/node_modules\/chai-as-promised/],

integration/compat-interop/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"moduleResolution": "node",
99
"noImplicitAny": true,
1010
"outDir": "dist",
11-
"target": "es2017",
11+
"target": "es2020",
1212
"sourceMap": true,
1313
"esModuleInterop": true
1414
},

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@
111111
"http-server": "14.1.1",
112112
"indexeddbshim": "10.1.0",
113113
"inquirer": "8.2.6",
114-
"istanbul-instrumenter-loader": "3.0.1",
115114
"js-yaml": "4.1.0",
116115
"karma": "6.4.4",
117116
"karma-chrome-launcher": "3.2.0",

packages/ai/rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const buildPlugins = [
3939
'integration'
4040
],
4141
compilerOptions: {
42-
target: 'es2017'
42+
target: 'es2020'
4343
}
4444
}
4545
}),

packages/app/src/heartbeatService.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,10 @@ describe('HeartbeatServiceImpl', () => {
149149
expect(emptyHeaders).to.equal('');
150150
});
151151
it(`triggerHeartbeat() doesn't throw even if code errors`, async () => {
152-
//@ts-expect-error Ensure this doesn't match
153-
heartbeatService._heartbeatsCache?.lastSentHeartbeatDate = 50;
152+
if (heartbeatService._heartbeatsCache) {
153+
//@ts-expect-error Ensure this doesn't match
154+
heartbeatService._heartbeatsCache.lastSentHeartbeatDate = 50;
155+
}
154156
//@ts-expect-error Ensure you can't .push() to this
155157
heartbeatService._heartbeatsCache.heartbeats = 50;
156158
const warnStub = stub(console, 'warn');

packages/auth/demo/rollup.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ const workerPlugins = [
3131
tsconfigOverride: {
3232
compilerOptions: {
3333
declaration: false,
34-
target: 'es2017',
34+
target: 'es2020',
3535
lib: [
3636
// TODO: remove this
3737
'dom',
38-
'es2017',
38+
'es2020',
3939
'webworker'
4040
]
4141
}

packages/auth/demo/src/worker/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"extends": "../../../config/tsconfig.base.json",
33
"compilerOptions": {
44
"outDir": "dist",
5-
"target": "es2017",
5+
"target": "es2020",
66
"lib": [
7-
"es2017",
7+
"es2020",
88
"webworker"
99
]
1010
},

packages/auth/rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ const webWorkerBuild = {
200200
lib: [
201201
// Remove dom after we figure out why navigator stuff doesn't exist
202202
'dom',
203-
'es2017',
203+
'es2020',
204204
'webworker'
205205
]
206206
}

packages/firestore-compat/rollup.config.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ const util = require('../firestore/rollup.shared');
2525

2626
const deps = Object.keys({ ...pkg.peerDependencies, ...pkg.dependencies });
2727

28-
const es2017Plugins = [
28+
const es2020Plugins = [
2929
typescriptPlugin({
3030
typescript,
3131
tsconfigOverride: {
3232
compilerOptions: {
33-
target: 'es2017'
33+
target: 'es2020'
3434
}
3535
},
3636
transformers: [util.removeAssertTransformer]
@@ -46,7 +46,7 @@ const browserBuilds = [
4646
format: 'es',
4747
sourcemap: true
4848
},
49-
plugins: es2017Plugins,
49+
plugins: es2020Plugins,
5050
external: id => deps.some(dep => id === dep || id.startsWith(`${dep}/`))
5151
},
5252
{
@@ -58,7 +58,7 @@ const browserBuilds = [
5858
sourcemap: true
5959
}
6060
],
61-
plugins: es2017Plugins,
61+
plugins: es2020Plugins,
6262
external: id => deps.some(dep => id === dep || id.startsWith(`${dep}/`))
6363
}
6464
];
@@ -71,7 +71,7 @@ const nodeBuilds = [
7171
format: 'cjs',
7272
sourcemap: true
7373
},
74-
plugins: es2017Plugins,
74+
plugins: es2020Plugins,
7575
external: deps
7676
},
7777
{
@@ -81,7 +81,7 @@ const nodeBuilds = [
8181
format: 'es',
8282
sourcemap: true
8383
},
84-
plugins: [...es2017Plugins, emitModulePackageFile()],
84+
plugins: [...es2020Plugins, emitModulePackageFile()],
8585
external: deps
8686
}
8787
];
@@ -94,7 +94,7 @@ const rnBuilds = [
9494
format: 'es',
9595
sourcemap: true
9696
},
97-
plugins: es2017Plugins,
97+
plugins: es2020Plugins,
9898
external: deps
9999
}
100100
];

packages/firestore/rollup.config.debug.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const browserPlugins = function () {
3535
typescript,
3636
tsconfigOverride: {
3737
compilerOptions: {
38-
target: 'es2017'
38+
target: 'es2020'
3939
}
4040
},
4141
cacheDir: tmp.dirSync(),

packages/firestore/rollup.config.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ const allBuilds = [
9797
cacheDir: tmp.dirSync()
9898
}),
9999
sourcemaps(),
100-
replace(generateBuildTargetReplaceConfig('cjs', 2017))
100+
replace(generateBuildTargetReplaceConfig('cjs', 2020))
101101
],
102102
external: util.resolveNodeExterns,
103103
treeshake: {
@@ -114,7 +114,7 @@ const allBuilds = [
114114
},
115115
plugins: [
116116
sourcemaps(),
117-
replace(generateBuildTargetReplaceConfig('esm', 2017))
117+
replace(generateBuildTargetReplaceConfig('esm', 2020))
118118
],
119119
external: util.resolveNodeExterns,
120120
treeshake: {
@@ -137,7 +137,7 @@ const allBuilds = [
137137
moduleSideEffects: false
138138
}
139139
},
140-
// Convert es2017 build to cjs
140+
// Convert es2020 build to cjs
141141
{
142142
input: pkg['browser'],
143143
output: [
@@ -149,14 +149,14 @@ const allBuilds = [
149149
],
150150
plugins: [
151151
sourcemaps(),
152-
replace(generateBuildTargetReplaceConfig('cjs', 2017))
152+
replace(generateBuildTargetReplaceConfig('cjs', 2020))
153153
],
154154
external: util.resolveBrowserExterns,
155155
treeshake: {
156156
moduleSideEffects: false
157157
}
158158
},
159-
// es2017 build with build target reporting
159+
// es2020 build with build target reporting
160160
{
161161
input: pkg['browser'],
162162
output: [
@@ -168,7 +168,7 @@ const allBuilds = [
168168
],
169169
plugins: [
170170
sourcemaps(),
171-
replace(generateBuildTargetReplaceConfig('esm', 2017))
171+
replace(generateBuildTargetReplaceConfig('esm', 2020))
172172
],
173173
external: util.resolveBrowserExterns,
174174
treeshake: {
@@ -186,7 +186,7 @@ const allBuilds = [
186186
plugins: [
187187
alias(util.generateAliasConfig('rn')),
188188
...browserPlugins,
189-
replace(generateBuildTargetReplaceConfig('esm', 2017))
189+
replace(generateBuildTargetReplaceConfig('esm', 2020))
190190
],
191191
external: util.resolveBrowserExterns,
192192
treeshake: {

packages/firestore/rollup.config.lite.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ const allBuilds = [
140140
moduleSideEffects: false
141141
}
142142
},
143-
// Convert es2017 build to CJS
143+
// Convert es2020 build to CJS
144144
{
145145
input: path.resolve('./lite', pkg.browser),
146146
output: [
@@ -159,7 +159,7 @@ const allBuilds = [
159159
moduleSideEffects: false
160160
}
161161
},
162-
// Browser es2017 build
162+
// Browser es2020 build
163163
{
164164
input: path.resolve('./lite', pkg.browser),
165165
output: [

packages/firestore/rollup.shared.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ const pkg = require('./package.json');
3333
// This file contains shared utilities for Firestore's rollup builds.
3434

3535
// Firestore is released in a number of different build configurations:
36-
// - Browser builds that support persistence in ES2017 CJS and ESM formats.
37-
// - In-memory Browser builds that support persistence in ES2017 CJS and ESM
36+
// - Browser builds that support persistence in ES2020 CJS and ESM formats.
37+
// - In-memory Browser builds that support persistence in ES2020 CJS and ESM
3838
// formats.
3939
// - A NodeJS build that supports persistence (to be used with an IndexedDb
4040
// shim)
@@ -46,7 +46,7 @@ const pkg = require('./package.json');
4646
// We use two different rollup pipelines to take advantage of tree shaking,
4747
// as Rollup does not support tree shaking for TypeScript classes transpiled
4848
// down to ES5 (see https://bit.ly/340P23U). The build pipeline in this file
49-
// produces tree-shaken ES2017 builds that are consumed by the ES5 builds in
49+
// produces tree-shaken ES2020 builds that are consumed by the ES5 builds in
5050
// `rollup.config.es.js`.
5151
//
5252
// All browser builds rely on Terser's property name mangling to reduce code
@@ -240,7 +240,7 @@ exports.applyPrebuilt = function (name = 'prebuilt.js') {
240240
});
241241
};
242242

243-
exports.es2017Plugins = function (platform, mangled = false) {
243+
exports.es2020Plugins = function (platform, mangled = false) {
244244
if (mangled) {
245245
return [
246246
alias(generateAliasConfig(platform)),
@@ -265,7 +265,7 @@ exports.es2017Plugins = function (platform, mangled = false) {
265265
}
266266
};
267267

268-
exports.es2017PluginsCompat = function (
268+
exports.es2020PluginsCompat = function (
269269
platform,
270270
pathTransformer,
271271
mangled = false

packages/firestore/scripts/build-bundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/firestore/scripts/build-bundle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ async function buildBundle(input: string, output: string): Promise<void> {
5454
typescriptPlugin({
5555
tsconfigOverride: {
5656
compilerOptions: {
57-
target: 'es2017'
57+
target: 'es2020'
5858
}
5959
},
6060
transformers: [util.removeAssertTransformer]

packages/messaging-compat/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"compilerOptions": {
44
"outDir": "dist",
55
"noUnusedLocals": true,
6-
"lib": ["dom", "es2017"],
6+
"lib": ["dom", "es2020"],
77
"downlevelIteration": true
88
},
99
"exclude": ["dist/**/*"]

packages/messaging/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"compilerOptions": {
44
"outDir": "dist",
55
"noUnusedLocals": true,
6-
"lib": ["dom", "es2017"],
6+
"lib": ["dom", "es2020"],
77
"downlevelIteration": true
88
},
99
"exclude": ["dist/**/*"]

packages/performance-compat/rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const buildPlugins = [
3030
typescript,
3131
tsconfigOverride: {
3232
compilerOptions: {
33-
target: 'es2017'
33+
target: 'es2020'
3434
}
3535
}
3636
}),

packages/remote-config-compat/rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const buildPlugins = [
3030
typescript,
3131
tsconfigOverride: {
3232
compilerOptions: {
33-
target: 'es2017'
33+
target: 'es2020'
3434
}
3535
}
3636
}),

packages/storage-compat/rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const buildPlugins = [
3131
abortOnError: false,
3232
tsconfigOverride: {
3333
compilerOptions: {
34-
target: 'es2017'
34+
target: 'es2020'
3535
}
3636
}
3737
}),

packages/webchannel-wrapper/rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const buildPlugins = [
3939
typescript,
4040
tsconfigOverride: {
4141
compilerOptions: {
42-
target: 'es2017'
42+
target: 'es2020'
4343
}
4444
}
4545
}),

repo-scripts/changelog-generator/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
"moduleResolution": "node",
1010
"esModuleInterop": true,
1111
"resolveJsonModule": true,
12-
"target": "es2017"
12+
"target": "es2020"
1313
}
1414
}

repo-scripts/prune-dts/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"module": "commonjs",
66
"moduleResolution": "node",
77
"resolveJsonModule": true,
8-
"target": "es2017",
8+
"target": "es2020",
99
"esModuleInterop": true,
1010
"declaration": true,
1111
"strict": true,

0 commit comments

Comments
 (0)