Skip to content

Commit 2d72099

Browse files
authored
build!: update build targets to ES2020 (#9101)
1 parent f11b552 commit 2d72099

File tree

94 files changed

+274
-499
lines changed

Some content is hidden

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

94 files changed

+274
-499
lines changed

config/.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ module.exports = {
3131
'unused-imports'
3232
],
3333
'parserOptions': {
34-
'ecmaVersion': 2017,
34+
'ecmaVersion': 2020,
3535
'sourceType': 'module'
3636
},
3737
'overrides': [

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/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"node": ">=18.0.0"
88
},
99
"main": "dist/index.cjs.js",
10-
"browser": "dist/esm/index.esm2017.js",
11-
"module": "dist/esm/index.esm2017.js",
10+
"browser": "dist/esm/index.esm.js",
11+
"module": "dist/esm/index.esm.js",
1212
"exports": {
1313
".": {
1414
"types": "./dist/ai-public.d.ts",
@@ -18,9 +18,9 @@
1818
},
1919
"browser": {
2020
"require": "./dist/index.cjs.js",
21-
"import": "./dist/esm/index.esm2017.js"
21+
"import": "./dist/esm/index.esm.js"
2222
},
23-
"default": "./dist/esm/index.esm2017.js"
23+
"default": "./dist/esm/index.esm.js"
2424
},
2525
"./package.json": "./package.json"
2626
},

packages/ai/rollup.config.js

Lines changed: 5 additions & 5 deletions
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
}),
@@ -57,7 +57,7 @@ const browserBuilds = [
5757
plugins: [
5858
...buildPlugins,
5959
replace({
60-
...generateBuildTargetReplaceConfig('esm', 2017),
60+
...generateBuildTargetReplaceConfig('esm', 2020),
6161
__PACKAGE_VERSION__: pkg.version
6262
}),
6363
emitModulePackageFile()
@@ -74,7 +74,7 @@ const browserBuilds = [
7474
plugins: [
7575
...buildPlugins,
7676
replace({
77-
...generateBuildTargetReplaceConfig('cjs', 2017),
77+
...generateBuildTargetReplaceConfig('cjs', 2020),
7878
__PACKAGE_VERSION__: pkg.version
7979
})
8080
],
@@ -93,7 +93,7 @@ const nodeBuilds = [
9393
plugins: [
9494
...buildPlugins,
9595
replace({
96-
...generateBuildTargetReplaceConfig('esm', 2017)
96+
...generateBuildTargetReplaceConfig('esm', 2020)
9797
})
9898
],
9999
external: id => deps.some(dep => id === dep || id.startsWith(`${dep}/`))
@@ -108,7 +108,7 @@ const nodeBuilds = [
108108
plugins: [
109109
...buildPlugins,
110110
replace({
111-
...generateBuildTargetReplaceConfig('cjs', 2017)
111+
...generateBuildTargetReplaceConfig('cjs', 2020)
112112
})
113113
],
114114
external: id => deps.some(dep => id === dep || id.startsWith(`${dep}/`))

packages/ai/src/index.node.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function registerAI(): void {
5555
);
5656

5757
registerVersion(name, version, 'node');
58-
// BUILD_TARGET will be replaced by values like esm2017, cjs2017, etc during the compilation
58+
// BUILD_TARGET will be replaced by values like esm, cjs, etc during the compilation
5959
registerVersion(name, version, '__BUILD_TARGET__');
6060
}
6161

packages/ai/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ function registerAI(): void {
6161
);
6262

6363
registerVersion(name, version);
64-
// BUILD_TARGET will be replaced by values like esm2017, cjs2017, etc during the compilation
64+
// BUILD_TARGET will be replaced by values like esm, cjs, etc during the compilation
6565
registerVersion(name, version, '__BUILD_TARGET__');
6666
}
6767

packages/analytics-compat/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"description": "",
55
"author": "Firebase <[email protected]> (https://firebase.google.com/)",
66
"main": "dist/index.cjs.js",
7-
"browser": "dist/esm/index.esm2017.js",
8-
"module": "dist/esm/index.esm2017.js",
7+
"browser": "dist/esm/index.esm.js",
8+
"module": "dist/esm/index.esm.js",
99
"exports": {
1010
".": {
1111
"types": "./dist/src/index.d.ts",
1212
"require": "./dist/index.cjs.js",
13-
"default": "./dist/esm/index.esm2017.js"
13+
"default": "./dist/esm/index.esm.js"
1414
},
1515
"./package.json": "./package.json"
1616
},

0 commit comments

Comments
 (0)