diff --git a/debian/patches/fix-babel-plugin-dynamic-import-node.diff b/debian/patches/fix-babel-plugin-dynamic-import-node.diff deleted file mode 100644 index 4ace7ed9..00000000 --- a/debian/patches/fix-babel-plugin-dynamic-import-node.diff +++ /dev/null @@ -1,51 +0,0 @@ -Description: Fix babel-plugin-dynamic-import-node build -Author: Xavier Guimard -Forwarded: not-needed -Last-Update: 2020-05-19 - ---- a/Makefile -+++ b/Makefile -@@ -13,7 +13,7 @@ - COMMA_SEPARATED_SOURCES = $(subst $(SPACE),$(COMMA),$(SOURCES)) - - YARN := yarn --NODE := $(YARN) node -+NODE := node - - - .PHONY: build build-dist watch lint fix clean test-clean test-only test test-ci publish bootstrap ---- a/babel-plugin-dynamic-import-node/.babelrc -+++ b/babel-plugin-dynamic-import-node/.babelrc -@@ -1,9 +1,5 @@ - { - "presets": [ -- "airbnb" -- ], -- "plugins": [ -- "add-module-exports", -- ["transform-replace-object-assign", { "moduleSpecifier": "object.assign" }], -- ], -+ "@babel/preset-env" -+ ] - } ---- a/babel-plugin-dynamic-import-node/package.json -+++ b/babel-plugin-dynamic-import-node/package.json -@@ -47,16 +47,12 @@ - "@babel/plugin-transform-template-literals": "^7.8.3", - "@babel/preset-env": "^7.9.5", - "airbnb-js-shims": "^2.2.1", -- "babel-cli": "^6.26.0", -- "babel-core": "^6.26.3", -+ "@babel/cli": "^7.4.5", -+ "@babel/core": "^7.4.5", - "babel-eslint": "^9.0.0", - "babel-plugin-add-module-exports": "^0.2.1", -- "babel-plugin-external-helpers": "^6.22.0", -- "babel-plugin-transform-es2015-template-literals": "^6.22.0", - "babel-plugin-transform-replace-object-assign": "^1.0.0", - "babel-preset-airbnb": "^2.6.0", -- "babel-preset-es2015": "^6.24.1", -- "babel-register": "^6.26.0", - "eslint": "^6.8.0", - "eslint-config-airbnb-base": "^14.1.0", - "eslint-plugin-import": "^2.20.2", diff --git a/debian/patches/fix-large-numbers.diff b/debian/patches/fix-large-numbers.diff deleted file mode 100644 index 1695fbaa..00000000 --- a/debian/patches/fix-large-numbers.diff +++ /dev/null @@ -1,38 +0,0 @@ -Description: fix large numbers -Author: Xavier Guimard -Forwarded: not-needed -Last-Update: 2020-05-19 - ---- a/packages/babel-core/src/transformation/normalize-file.js -+++ b/packages/babel-core/src/transformation/normalize-file.js -@@ -12,7 +12,7 @@ - import parser from "../parser"; - - const debug = buildDebug("babel:transform:file"); --const LARGE_INPUT_SOURCEMAP_THRESHOLD = 1_000_000; -+const LARGE_INPUT_SOURCEMAP_THRESHOLD = 1000000; - - export type NormalizedFile = { - code: string, ---- a/packages/babel-generator/src/index.js -+++ b/packages/babel-generator/src/index.js -@@ -79,7 +79,7 @@ - } - - if (format.compact === "auto") { -- format.compact = code.length > 500_000; // 500KB -+ format.compact = code.length > 500000; // 500KB - - if (format.compact) { - console.error( ---- a/packages/babel-traverse/src/context.js -+++ b/packages/babel-traverse/src/context.js -@@ -117,7 +117,7 @@ - // this path no longer belongs to the tree - if (path.key === null) continue; - -- if (testing && queue.length >= 10_000) { -+ if (testing && queue.length >= 10000) { - this.trap = true; - } - diff --git a/debian/patches/fix-pirates-build.diff b/debian/patches/fix-pirates-build.diff deleted file mode 100644 index 25bf8cab..00000000 --- a/debian/patches/fix-pirates-build.diff +++ /dev/null @@ -1,17 +0,0 @@ -Description: add missing build dependency to yarn in npm build profile -Author: Xavier Guimard -Forwarded: no -Last-Update: 2020-05-19 - ---- a/pirates/package.json -+++ b/pirates/package.json -@@ -49,7 +49,8 @@ - "prettier": "^1.16.4", - "rewire": "^4.0.1", - "rimraf": "^2.6.1", -- "semantic-release": "^15.7.0" -+ "semantic-release": "^15.7.0", -+ "yarn": "*" - }, - "license": "MIT", - "bugs": { diff --git a/debian/patches/fix-rollup-plugin-replace-warning.patch b/debian/patches/fix-rollup-plugin-replace-warning.patch deleted file mode 100644 index 325c0c89..00000000 --- a/debian/patches/fix-rollup-plugin-replace-warning.patch +++ /dev/null @@ -1,15 +0,0 @@ -Description: fix warning due to @rollup/plugin-replace update -Author: Yadd -Forwarded: no -Last-Update: 2021-12-01 - ---- a/Gulpfile.js -+++ b/Gulpfile.js -@@ -253,6 +253,7 @@ - "process.env.NODE_ENV": JSON.stringify(process.env.NODE_ENV), - BABEL_VERSION: JSON.stringify(babelVersion), - VERSION: JSON.stringify(version), -+ preventAssignment: true, - }), - rollupBabel({ - envName: babelEnvName, diff --git a/debian/patches/ignore-one-missing-ts-definition.patch b/debian/patches/ignore-one-missing-ts-definition.patch deleted file mode 100644 index a67ac66c..00000000 --- a/debian/patches/ignore-one-missing-ts-definition.patch +++ /dev/null @@ -1,12 +0,0 @@ -Description: ignore charcode ts definitions -Author: Xavier Guimard -Forwarded: no -Last-Update: 2021-01-03 - ---- a/packages/babel-helper-validator-identifier/src/identifier.ts -+++ b/packages/babel-helper-validator-identifier/src/identifier.ts -@@ -1,3 +1,4 @@ -+// @ts-ignore - import * as charCodes from "charcodes"; - - // ## Character categories diff --git a/debian/patches/load-plugins-from-system-libraries.diff b/debian/patches/load-plugins-from-system-libraries.diff deleted file mode 100644 index eef0c0f3..00000000 --- a/debian/patches/load-plugins-from-system-libraries.diff +++ /dev/null @@ -1,21 +0,0 @@ -Description: add Debian paths to find babel plugins -Author: Xavier Guimard -Forwarded: not-needed -Last-Update: 2020-12-13 - ---- a/packages/babel-core/src/config/files/plugins.js -+++ b/packages/babel-core/src/config/files/plugins.js -@@ -101,6 +101,13 @@ - } catch (e) { - if (e.code !== "MODULE_NOT_FOUND") throw e; - -+ try { -+ return require.resolve(standardizedName, { -+ paths: ['/usr/share/nodejs','/usr/lib/nodejs'], -+ }); -+ } catch (e) { -+ // Nothing to do, let's continue -+ } - if (standardizedName !== name) { - let resolvedOriginal = false; - try { diff --git a/debian/patches/remove-useless-dependency.patch b/debian/patches/remove-useless-dependency.patch deleted file mode 100644 index d96947a5..00000000 --- a/debian/patches/remove-useless-dependency.patch +++ /dev/null @@ -1,17 +0,0 @@ -Description: node-environment-flags isn't required anywhere - and it's just a polyfill of process.allowedNodeEnvironmentFlags -Author: Xavier Guimard -Bug-Debian: https://bugs.debian.org/977232 -Forwarded: no -Last-Update: 2020-12-17 - ---- a/packages/babel-node/package.json -+++ b/packages/babel-node/package.json -@@ -27,7 +27,6 @@ - "commander": "^4.0.1", - "core-js": "^3.2.1", - "lodash": "^4.17.19", -- "node-environment-flags": "^1.0.5", - "regenerator-runtime": "^0.13.4", - "v8flags": "^3.1.1" - }, diff --git a/debian/patches/series b/debian/patches/series deleted file mode 100644 index c8cf12e8..00000000 --- a/debian/patches/series +++ /dev/null @@ -1,11 +0,0 @@ -use-system-gulp.patch -load-plugins-from-system-libraries.diff -skip-prettier.patch -fix-babel-plugin-dynamic-import-node.diff -fix-large-numbers.diff -fix-pirates-build.diff -switch-to-yarnpkg.patch -remove-useless-dependency.patch -ignore-one-missing-ts-definition.patch -update-rollup-and-babel-paths.patch -fix-rollup-plugin-replace-warning.patch diff --git a/debian/patches/skip-prettier.patch b/debian/patches/skip-prettier.patch deleted file mode 100644 index 860e7585..00000000 --- a/debian/patches/skip-prettier.patch +++ /dev/null @@ -1,23 +0,0 @@ -Description: prettier is not packaged, so we will skip it -Forwarded: not-needed -Reviewed-By: Xavier Guimard -Last-Update: 2020-11-28 - ---- a/scripts/utils/formatCode.js -+++ b/scripts/utils/formatCode.js -@@ -9,14 +9,8 @@ - return code; - }; - } else { -- const prettier = require("prettier"); - - module.exports = function formatCode(code, filename) { -- filename = filename || __filename; -- const prettierConfig = prettier.resolveConfig.sync(filename); -- prettierConfig.filepath = filename; -- prettierConfig.parser = filename.endsWith(".ts") ? "babel-ts" : "babel"; -- -- return prettier.format(code, prettierConfig); -+ return code; - }; - } diff --git a/debian/patches/switch-to-yarnpkg.patch b/debian/patches/switch-to-yarnpkg.patch deleted file mode 100644 index 28945a3c..00000000 --- a/debian/patches/switch-to-yarnpkg.patch +++ /dev/null @@ -1,15 +0,0 @@ -Description: Switch to yarnpkg - babel can no longer be built by npm as they use yarn specific features in - package.json. So use yarnpkg everywhere. - ---- a/babel-plugin-dynamic-import-node/package.json -+++ b/babel-plugin-dynamic-import-node/package.json -@@ -8,7 +8,7 @@ - }, - "scripts": { - "clean": "rimraf lib", -- "prebuild": "npm run clean", -+ "prebuild": "yarnpkg clean", - "build": "babel src --out-dir lib", - "pretest": "npm run lint", - "test": "npm run tests-only", diff --git a/debian/patches/update-rollup-and-babel-paths.patch b/debian/patches/update-rollup-and-babel-paths.patch deleted file mode 100644 index 6826b5e3..00000000 --- a/debian/patches/update-rollup-and-babel-paths.patch +++ /dev/null @@ -1,40 +0,0 @@ -Description: update babel and rollup paths to use Debian packages files -Author: Xavier Guimard -Forwarded: not-needed -Last-Update: 2021-01-05 - ---- a/Gulpfile.js -+++ b/Gulpfile.js -@@ -240,6 +240,7 @@ - input, - external, - onwarn(warning, warn) { -+ if (warning.code === 'THIS_IS_UNDEFINED') return; - if (warning.code !== "CIRCULAR_DEPENDENCY") { - warn(warning); - // https://github.com/babel/babel/pull/12011#discussion_r540434534 -@@ -272,6 +273,11 @@ - "packages/babel-preset-env/data/*.js", - // Rollup doesn't read export maps, so it loads the cjs fallback - "packages/babel-compat-data/*.js", -+ /nodejs/, -+ "../**/nodejs/**", -+ "/usr/share/**", -+ "/usr/lib/**", -+ "debian/**", - ], - }), - rollupJson(), ---- a/babel.config.js -+++ b/babel.config.js -@@ -36,6 +36,10 @@ - "codemods/*/test", - "eslint/*/src", - "eslint/*/test", -+ "../**/nodejs/*/", -+ "/usr/share/nodejs/*/", -+ "/usr/lib/nodejs/*/", -+ "/usr/share/javascript/*/", - ]; - - switch (env) { diff --git a/debian/patches/use-system-gulp.patch b/debian/patches/use-system-gulp.patch deleted file mode 100644 index bb31a5db..00000000 --- a/debian/patches/use-system-gulp.patch +++ /dev/null @@ -1,87 +0,0 @@ -Description: Use system gulp -Forwarded: not-needed -Reviewed-By: Xavier Guimard -Last-Update: 2021-01-04 - ---- a/Makefile -+++ b/Makefile -@@ -24,7 +24,11 @@ - endif - - build-bundle: clean clean-lib -- $(YARN) gulp build -+ifeq (,$(filter npm,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES))) -+ gulp build -+else -+ ./node_modules/.bin/gulp build -+endif - $(MAKE) build-flow-typings - $(MAKE) build-dist - -@@ -35,7 +39,11 @@ - $(NODE) scripts/generators/tsconfig.js - - generate-type-helpers: -- $(YARN) gulp generate-type-helpers -+ifeq (,$(filter npm,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES))) -+ gulp generate-type-helpers -+else -+ ./node_modules/.bin/gulp generate-type-helpers -+endif - - build-flow-typings: - $(NODE) packages/babel-types/scripts/generators/flow.js > packages/babel-types/lib/index.js.flow -@@ -50,10 +58,18 @@ - $(MAKE) build-standalone - - build-babel-standalone: -- $(YARN) gulp build-babel-standalone -+ifeq (,$(filter npm,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES))) -+ gulp build-babel-standalone -+else -+ ./node_modules/.bin/gulp build-babel-standalone -+endif - - prepublish-build-standalone: -- BABEL_ENV=production IS_PUBLISH=true $(YARN) gulp build-babel-standalone -+ifeq (,$(filter npm,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES))) -+ BABEL_ENV=production IS_PUBLISH=true gulp build-babel-standalone -+else -+ BABEL_ENV=production IS_PUBLISH=true ./node_modules/.bin/gulp build-babel-standalone -+endif - - build-dist: build-plugin-transform-runtime-dist - -@@ -62,13 +78,21 @@ - $(NODE) scripts/build-dist.js - - build-no-bundle: clean clean-lib -- BABEL_ENV=development $(YARN) gulp build-dev -+ifeq (,$(filter npm,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES))) -+ BABEL_ENV=development gulp build-dev -+else -+ BABEL_ENV=development ./node_modules/.bin/gulp build-dev -+endif - # Ensure that build artifacts for types are created during local - # development too. - $(MAKE) build-flow-typings - - watch: build-no-bundle -- BABEL_ENV=development $(YARN) gulp watch -+ifeq (,$(filter npm,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES))) -+ BABEL_ENV=development gulp watch -+else -+ BABEL_ENV=development gulp watch -+endif - - flowcheck-ci: - $(MAKE) flow -@@ -76,7 +100,7 @@ - code-quality: tscheck flow lint - - tscheck: generate-tsconfig -- $(YARN) tsc -b . -+ tsc -b . - - flow: build-flow-typings - $(YARN) flow check --strip-root diff --git a/debian/source/format b/debian/source/format index 163aaf8d..89ae9db8 100644 --- a/debian/source/format +++ b/debian/source/format @@ -1 +1 @@ -3.0 (quilt) +3.0 (native)