diff --git a/babel_config.js b/babel_config.js deleted file mode 100644 index d232f4bf1..000000000 --- a/babel_config.js +++ /dev/null @@ -1,27 +0,0 @@ -export default { - babelrc: false, - presets: [ - ["@babel/preset-env", { - // Cf. https://github.com/rollup/rollup-plugin-babel#modules - modules: false, - targets: { - browsers: [ - "Firefox >= 52", - "FirefoxAndroid >= 52", - "Chrome >= 55", - "ChromeAndroid >= 55", - "Edge >= 15", - "Safari >= 10.1", - "iOS >= 10.3", - ], - node: "10.0.0", - }, - exclude: [ - // Exclude regeneratorRuntime explicitly because babel-preset-env - // incorrectly transpiles async functions for Firefox 52. - // See https://github.com/babel/babel/issues/8086. - "transform-regenerator" - ], - }] - ] -}; diff --git a/bundle_config.js b/bundle_config.js deleted file mode 100644 index dd767d5b8..000000000 --- a/bundle_config.js +++ /dev/null @@ -1,8 +0,0 @@ -export default { - output: { - format: 'umd', - }, - acorn: { - ecmaVersion: 9, - }, -}; diff --git a/compat_config.js b/compat_config.js deleted file mode 100644 index 75fbb70f4..000000000 --- a/compat_config.js +++ /dev/null @@ -1,11 +0,0 @@ -import babel from 'rollup-plugin-babel'; -import babelConfig from './babel_config'; - -export default { - output: { - format: 'umd' - }, - plugins: [ - babel(babelConfig), - ], -}; diff --git a/fluent-bundle/.gitignore b/fluent-bundle/.gitignore index 99472bc4d..0bd1f3fc5 100644 --- a/fluent-bundle/.gitignore +++ b/fluent-bundle/.gitignore @@ -1,3 +1,2 @@ esm/ /index.js -/compat.js diff --git a/fluent-bundle/makefile b/fluent-bundle/makefile index 17f0449bc..834d83239 100644 --- a/fluent-bundle/makefile +++ b/fluent-bundle/makefile @@ -24,23 +24,14 @@ test: esm/.compiled test/**/*_test.js .PHONY: build -build: index.js compat.js +build: index.js index.js: esm/.compiled @rollup $(CURDIR)/esm/index.js \ - --config $(ROOT)/bundle_config.js \ - --banner "/* $(PACKAGE)@$(VERSION) */" \ - --amd.id $(PACKAGE) \ - --name $(GLOBAL) \ - --output.file $@ - @echo -e " $(OK) $@ built" - -compat.js: esm/.compiled - @rollup $(CURDIR)/esm/index.js \ - --config $(ROOT)/compat_config.js \ --banner "/* $(PACKAGE)@$(VERSION) */" \ --amd.id $(PACKAGE) \ --name $(GLOBAL) \ + --output.format umd \ --output.file $@ @echo -e " $(OK) $@ built" @@ -56,7 +47,7 @@ html: clean: @rm -f esm/*.js esm/*.d.ts esm/.compiled - @rm -f index.js compat.js + @rm -f index.js @rm -rf .nyc_output coverage @echo -e " $(OK) clean" diff --git a/fluent-bundle/tsconfig.json b/fluent-bundle/tsconfig.json index 45fefaee8..acbbd6f6f 100644 --- a/fluent-bundle/tsconfig.json +++ b/fluent-bundle/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "es2019", + "target": "es2018", "module": "es2015", "strict": true, "allowJs": false, diff --git a/fluent-dedent/.gitignore b/fluent-dedent/.gitignore index 99472bc4d..0bd1f3fc5 100644 --- a/fluent-dedent/.gitignore +++ b/fluent-dedent/.gitignore @@ -1,3 +1,2 @@ esm/ /index.js -/compat.js diff --git a/fluent-dedent/makefile b/fluent-dedent/makefile index 7bb9b437e..0c064efcf 100644 --- a/fluent-dedent/makefile +++ b/fluent-dedent/makefile @@ -24,23 +24,14 @@ test: esm/.compiled test/**/*_test.js .PHONY: build -build: index.js compat.js +build: index.js index.js: esm/.compiled @rollup $(CURDIR)/esm/index.js \ - --config $(ROOT)/bundle_config.js \ - --banner "/* $(PACKAGE)@$(VERSION) */" \ - --amd.id $(PACKAGE) \ - --name $(GLOBAL) \ - --output.file $@ - @echo -e " $(OK) $@ built" - -compat.js: esm/.compiled - @rollup $(CURDIR)/esm/index.js \ - --config $(ROOT)/compat_config.js \ --banner "/* $(PACKAGE)@$(VERSION) */" \ --amd.id $(PACKAGE) \ --name $(GLOBAL) \ + --output.format umd \ --output.file $@ @echo -e " $(OK) $@ built" @@ -56,6 +47,6 @@ html: clean: @rm -f esm/*.js esm/*.d.ts esm/.compiled - @rm -f index.js compat.js + @rm -f index.js @rm -rf .nyc_output coverage @echo -e " $(OK) clean" diff --git a/fluent-dedent/tsconfig.json b/fluent-dedent/tsconfig.json index 45fefaee8..acbbd6f6f 100644 --- a/fluent-dedent/tsconfig.json +++ b/fluent-dedent/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "es2019", + "target": "es2018", "module": "es2015", "strict": true, "allowJs": false, diff --git a/fluent-dom/.gitignore b/fluent-dom/.gitignore index 99472bc4d..0bd1f3fc5 100644 --- a/fluent-dom/.gitignore +++ b/fluent-dom/.gitignore @@ -1,3 +1,2 @@ esm/ /index.js -/compat.js diff --git a/fluent-dom/makefile b/fluent-dom/makefile index 44c0d4b7c..7c10690db 100644 --- a/fluent-dom/makefile +++ b/fluent-dom/makefile @@ -26,25 +26,15 @@ test: esm/.compiled test/**/*_test.js .PHONY: build -build: index.js compat.js +build: index.js index.js: esm/.compiled @rollup $(CURDIR)/esm/index.js \ - --config $(ROOT)/bundle_config.js \ - --banner "/* $(PACKAGE)@$(VERSION) */" \ - --amd.id $(PACKAGE) \ - --name $(GLOBAL) \ - --globals $(DEPS) \ - --output.file $@ - @echo -e " $(OK) $@ built" - -compat.js: esm/.compiled - @rollup $(CURDIR)/esm/index.js \ - --config $(ROOT)/compat_config.js \ --banner "/* $(PACKAGE)@$(VERSION) */" \ --amd.id $(PACKAGE) \ --name $(GLOBAL) \ --globals $(DEPS) \ + --output.format umd \ --output.file $@ @echo -e " $(OK) $@ built" @@ -60,6 +50,6 @@ html: clean: @rm -f esm/*.js esm/*.d.ts esm/.compiled - @rm -f index.js compat.js + @rm -f index.js @rm -rf .nyc_output coverage @echo -e " $(OK) clean" diff --git a/fluent-dom/tsconfig.json b/fluent-dom/tsconfig.json index 48f7e115b..bf200383e 100644 --- a/fluent-dom/tsconfig.json +++ b/fluent-dom/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "es2019", + "target": "es2018", "module": "es2015", "strict": true, "allowJs": true, diff --git a/fluent-gecko/package.json b/fluent-gecko/package.json index 747a3b711..8ee2c8ee5 100644 --- a/fluent-gecko/package.json +++ b/fluent-gecko/package.json @@ -26,5 +26,8 @@ "keywords": [ "localization", "l10n" - ] + ], + "devDependencies": { + "rollup-plugin-node-resolve": "^4.2.2" + } } diff --git a/fluent-gecko/vendor_config.js b/fluent-gecko/vendor_config.js index 4ae0f0d59..8b932e057 100644 --- a/fluent-gecko/vendor_config.js +++ b/fluent-gecko/vendor_config.js @@ -1,7 +1,6 @@ import nodeResolve from 'rollup-plugin-node-resolve'; -import bundleConfig from '../bundle_config'; -export default Object.assign({}, bundleConfig, { +export default { context: 'this', output: { format: 'cjs', @@ -31,4 +30,4 @@ export default Object.assign({}, bundleConfig, { plugins: [ nodeResolve(), ] -}); +}; diff --git a/fluent-gecko/xpcom_config.js b/fluent-gecko/xpcom_config.js index c1f889667..dbb3c7833 100644 --- a/fluent-gecko/xpcom_config.js +++ b/fluent-gecko/xpcom_config.js @@ -1,7 +1,6 @@ import nodeResolve from 'rollup-plugin-node-resolve'; -import bundleConfig from '../bundle_config'; -export default Object.assign({}, bundleConfig, { +export default { context: 'this', output: { format: 'es', @@ -29,4 +28,4 @@ export default Object.assign({}, bundleConfig, { plugins: [ nodeResolve(), ] -}); +}; diff --git a/fluent-langneg/.gitignore b/fluent-langneg/.gitignore index 99472bc4d..0bd1f3fc5 100644 --- a/fluent-langneg/.gitignore +++ b/fluent-langneg/.gitignore @@ -1,3 +1,2 @@ esm/ /index.js -/compat.js diff --git a/fluent-langneg/makefile b/fluent-langneg/makefile index cec32d13f..48a044ab9 100644 --- a/fluent-langneg/makefile +++ b/fluent-langneg/makefile @@ -24,23 +24,14 @@ test: esm/.compiled test/**/*_test.js .PHONY: build -build: index.js compat.js +build: index.js index.js: $(SOURCES) @rollup $(CURDIR)/esm/index.js \ - --config $(ROOT)/bundle_config.js \ - --banner "/* $(PACKAGE)@$(VERSION) */" \ - --amd.id $(PACKAGE) \ - --name $(GLOBAL) \ - --output.file $@ - @echo -e " $(OK) $@ built" - -compat.js: $(SOURCES) - @rollup $(CURDIR)/esm/index.js \ - --config $(ROOT)/compat_config.js \ --banner "/* $(PACKAGE)@$(VERSION) */" \ --amd.id $(PACKAGE) \ --name $(GLOBAL) \ + --output.format umd \ --output.file $@ @echo -e " $(OK) $@ built" @@ -56,6 +47,6 @@ html: clean: @rm -f esm/*.js esm/*.d.ts esm/.compiled - @rm -f index.js compat.js + @rm -f index.js @rm -rf .nyc_output coverage @echo -e " $(OK) clean" diff --git a/fluent-langneg/tsconfig.json b/fluent-langneg/tsconfig.json index 45fefaee8..acbbd6f6f 100644 --- a/fluent-langneg/tsconfig.json +++ b/fluent-langneg/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "es2019", + "target": "es2018", "module": "es2015", "strict": true, "allowJs": false, diff --git a/fluent-react/.gitignore b/fluent-react/.gitignore index 99472bc4d..0bd1f3fc5 100644 --- a/fluent-react/.gitignore +++ b/fluent-react/.gitignore @@ -1,3 +1,2 @@ esm/ /index.js -/compat.js diff --git a/fluent-react/babel.config.js b/fluent-react/babel.config.js index 4313a9aa0..67088a0b9 100644 --- a/fluent-react/babel.config.js +++ b/fluent-react/babel.config.js @@ -6,10 +6,4 @@ module.exports = { "targets": "node >= 10.0.0" }] ], - "plugins": [ - ["babel-plugin-transform-rename-import", { - "original": "fluent", - "replacement": "fluent/compat" - }] - ], }; diff --git a/fluent-react/compat_config.js b/fluent-react/compat_config.js deleted file mode 100644 index 2e5369239..000000000 --- a/fluent-react/compat_config.js +++ /dev/null @@ -1,27 +0,0 @@ -import babel from "rollup-plugin-babel"; -import compatConfig from "../compat_config"; -import babelConfig from "../babel_config"; - -export default { - ...compatConfig, - plugins: [ - ...compatConfig.plugins, - babel({ - ...babelConfig, - plugins: [ - ["babel-plugin-transform-rename-import", { - replacements: [ - { - original: "@fluent/sequence", - replacement: "@fluent/sequence/compat", - }, - { - original: "cached-iterable", - replacement: "cached-iterable/compat", - }, - ] - }], - ] - }), - ], -}; diff --git a/fluent-react/makefile b/fluent-react/makefile index d8e5c49d2..53c099bae 100644 --- a/fluent-react/makefile +++ b/fluent-react/makefile @@ -21,25 +21,15 @@ test: esm/.compiled @jest --collect-coverage .PHONY: build -build: index.js compat.js +build: index.js index.js: esm/.compiled @rollup $(CURDIR)/esm/index.js \ - --config $(ROOT)/bundle_config.js \ --banner "/* $(PACKAGE)@$(VERSION) */" \ --amd.id $(PACKAGE) \ --name $(GLOBAL) \ --globals @fluent/sequence:FluentSequence,cached-iterable:CachedIterable,react:React,prop-types:PropTypes \ - --output.file $@ - @echo -e " $(OK) $@ built" - -compat.js: esm/.compiled - @rollup $(CURDIR)/esm/index.js \ - --config $(CURDIR)/compat_config.js \ - --banner "/* $(PACKAGE)@$(VERSION) */" \ - --amd.id $(PACKAGE) \ - --name $(GLOBAL) \ - --globals @fluent/sequence/compat:FluentSequence,cached-iterable/compat:CachedIterable,react:React,prop-types:PropTypes \ + --output.format umd \ --output.file $@ @echo -e " $(OK) $@ built" @@ -55,6 +45,6 @@ html: clean: @rm -f esm/*.js esm/*.d.ts esm/.compiled - @rm -f index.js compat.js + @rm -f index.js @rm -rf .nyc_output coverage @echo -e " $(OK) clean" diff --git a/fluent-react/package.json b/fluent-react/package.json index b22636864..d78cdb27d 100644 --- a/fluent-react/package.json +++ b/fluent-react/package.json @@ -60,16 +60,10 @@ "@types/react": "^16.9.22", "@types/react-dom": "^16.9.5", "babel-jest": "^24.8.0", - "babel-plugin-transform-rename-import": "^2.2.0", "jest": "^24.8.0", "prettier": "^1.18.2", "react": "^16.8.0", "react-dom": "^16.8.0", "react-test-renderer": "^16.8.6" - }, - "jest": { - "transformIgnorePatterns": [ - "node_modules/(?!(@fluent/sequence)/)" - ] } } diff --git a/fluent-react/tsconfig.json b/fluent-react/tsconfig.json index 45fefaee8..acbbd6f6f 100644 --- a/fluent-react/tsconfig.json +++ b/fluent-react/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "es2019", + "target": "es2018", "module": "es2015", "strict": true, "allowJs": false, diff --git a/fluent-sequence/.gitignore b/fluent-sequence/.gitignore index 99472bc4d..0bd1f3fc5 100644 --- a/fluent-sequence/.gitignore +++ b/fluent-sequence/.gitignore @@ -1,3 +1,2 @@ esm/ /index.js -/compat.js diff --git a/fluent-sequence/makefile b/fluent-sequence/makefile index ebfdfbf0a..f3ab1795e 100644 --- a/fluent-sequence/makefile +++ b/fluent-sequence/makefile @@ -24,23 +24,14 @@ test: esm/.compiled test/**/*_test.js .PHONY: build -build: index.js compat.js +build: index.js index.js: esm/.compiled @rollup $(CURDIR)/esm/index.js \ - --config $(ROOT)/bundle_config.js \ - --banner "/* $(PACKAGE)@$(VERSION) */" \ - --amd.id $(PACKAGE) \ - --name $(GLOBAL) \ - --output.file $@ - @echo -e " $(OK) $@ built" - -compat.js: esm/.compiled - @rollup $(CURDIR)/esm/index.js \ - --config $(ROOT)/compat_config.js \ --banner "/* $(PACKAGE)@$(VERSION) */" \ --amd.id $(PACKAGE) \ --name $(GLOBAL) \ + --output.format umd \ --output.file $@ @echo -e " $(OK) $@ built" @@ -56,6 +47,6 @@ html: clean: @rm -f esm/*.js esm/*.d.ts esm/.compiled - @rm -f index.js compat.js + @rm -f index.js @rm -rf .nyc_output coverage @echo -e " $(OK) clean" diff --git a/fluent-sequence/tsconfig.json b/fluent-sequence/tsconfig.json index 45fefaee8..acbbd6f6f 100644 --- a/fluent-sequence/tsconfig.json +++ b/fluent-sequence/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "es2019", + "target": "es2018", "module": "es2015", "strict": true, "allowJs": false, diff --git a/fluent-syntax/.gitignore b/fluent-syntax/.gitignore index 99472bc4d..0bd1f3fc5 100644 --- a/fluent-syntax/.gitignore +++ b/fluent-syntax/.gitignore @@ -1,3 +1,2 @@ esm/ /index.js -/compat.js diff --git a/fluent-syntax/makefile b/fluent-syntax/makefile index c8686b7af..adb8bc751 100644 --- a/fluent-syntax/makefile +++ b/fluent-syntax/makefile @@ -24,23 +24,14 @@ test: esm/.compiled test/**/*_test.js .PHONY: build -build: index.js compat.js +build: index.js index.js: esm/.compiled @rollup $(CURDIR)/esm/index.js \ - --config $(ROOT)/bundle_config.js \ - --banner "/* $(PACKAGE)@$(VERSION) */" \ - --amd.id $(PACKAGE) \ - --name $(GLOBAL) \ - --output.file $@ - @echo -e " $(OK) $@ built" - -compat.js: esm/.compiled - @rollup $(CURDIR)/esm/index.js \ - --config $(ROOT)/compat_config.js \ --banner "/* $(PACKAGE)@$(VERSION) */" \ --amd.id $(PACKAGE) \ --name $(GLOBAL) \ + --output.format umd \ --output.file $@ @echo -e " $(OK) $@ built" @@ -56,7 +47,7 @@ html: clean: @rm -f esm/*.js esm/*.d.ts esm/.compiled - @rm -f index.js compat.js + @rm -f index.js @rm -rf .nyc_output coverage @echo -e " $(OK) clean" diff --git a/fluent-syntax/tsconfig.json b/fluent-syntax/tsconfig.json index 45fefaee8..acbbd6f6f 100644 --- a/fluent-syntax/tsconfig.json +++ b/fluent-syntax/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "es2019", + "target": "es2018", "module": "es2015", "strict": true, "allowJs": false, diff --git a/package.json b/package.json index 841643263..9091350eb 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,6 @@ "node": ">=10.0.0" }, "devDependencies": { - "@babel/core": "^7.4.3", - "@babel/preset-env": "^7.4.3", "@typescript-eslint/eslint-plugin": "^2.10.0", "@typescript-eslint/parser": "^2.10.0", "colors": "^1.3.3", @@ -22,8 +20,6 @@ "nyc": "^13.3.0", "prettyjson": "^1.2.1", "rollup": "^1.9.3", - "rollup-plugin-babel": "^4.3.2", - "rollup-plugin-node-resolve": "^4.2.2", "typedoc": "^0.15.3", "typescript": "^3.7.2" }