143 Commits

Author SHA1 Message Date
Babel Bot
23e884048a v7.16.7 2021-12-31 00:13:43 +00:00
Nicolò Ribaudo
d1cabf6bc8
[babel 8] Add "exports" to every package (#14013) 2021-12-29 16:29:10 +01:00
Babel Bot
7b7ab94066 v7.16.5 2021-12-13 22:12:58 +00:00
Nicolò Ribaudo
2d989a983d
Run tests in a native Node.js ESM environment (#13966) 2021-12-03 15:32:58 +01:00
Bogdan Savluk
0058b7fef4
Migrate Babel from Flow to TypeScript (except Babel parser) (#11578)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-11-25 23:09:13 +01:00
Nicolò Ribaudo
45308f3cba v7.16.0 2021-10-30 01:26:04 +02:00
Nicolò Ribaudo
c7ddb1ae93
Use workspace:^ to specify @babel/ dependencies (#13772)
* Enforce `workspace:^` to specify `@babel/` dependencies

* `yarn constraints --fix`

* Update lockfile
2021-10-25 07:22:08 +02:00
Babel Bot
a5624ea457 v7.15.3 2021-08-11 07:11:36 +00:00
Bogdan Savluk
d48a5cb55c
convert @babel/plugin-transform-block-scoping to typescript (#13219) 2021-08-10 20:53:18 +02:00
Babel Bot
7a2a928398 v7.14.5 2021-06-09 23:03:30 +00:00
Kristoffer K
140ec5aa5c
chore: setup Yarn constraints (#13363) 2021-05-31 18:46:03 +02:00
Babel Bot
219fd3ab1f v7.14.4 2021-05-28 16:50:09 +00:00
Alan Orozco
f35513fbaa
Hoist omitted keys from object spread operator (#13384) 2021-05-28 18:32:30 +02:00
Tobias Koppers
dbfa87740c
Improve performance (#13376) 2021-05-26 20:04:58 -05:00
Nicolò Ribaudo
e21abad016
Add test for fixed block scoping issue (#13304) 2021-05-12 20:16:10 -05:00
Babel Bot
7512095c84 v7.14.2 2021-05-12 16:58:57 +00:00
Huáng Jùnliàng
875fc8e693
[babel 8] Do not skip requeued paths (#13291) 2021-05-11 23:55:23 +02:00
Babel Bot
3ecc7919c5 v7.14.1 2021-05-04 01:46:37 +00:00
overlookmotel
f166b7ae58
Fix plugin-transform-block-scoping const violations (#13248)
* Fix plugin-transform-block-scoping const violations

Fixes #13245

* Replace `a++` with `+a` where const violation

* Remove assignment where const violation

* Remove assignment for `&&=`, `||=`, `??=` where const violation

* Shorten test
2021-05-03 11:47:25 -04:00
Babel Bot
d94a8e50ed v7.13.16 2021-04-20 11:11:32 +00:00
Huáng Jùnliàng
1e31d415be
refactor: use FunctionParent on visiting var scope (#13152) 2021-04-14 16:00:40 -04:00
Nicolò Ribaudo
d04842a700
Avoid using CJS globals in internal source files (#12963)
* Lint against CJS globals in modules

* Use `import.meta.url` instead of `__filename` in `src` files

* Prepare fixtures runner for `import.meta.url`

* Use `import.meta.url` instead of `__filename` in `test/index` files

* Remove `__dirname` from remaining test files

dirname

* Avoid using `module` in `src` files

* Avoid using `require` in `src` files

* Avoid using `require` in `test` files

* Update `@types/node`

* Compile dynamic import in `@babel/node`

* Fix windows

* Use `@babel/plugin-proposal-dynamic-import` from npm
2021-03-05 19:55:36 +01:00
Nicolò Ribaudo
ea6a438315
Enable external-helpers by default in tests (#12911)
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
Co-authored-by: Babel Bot <babel-bot@users.noreply.github.com>
2021-02-26 23:33:26 +01:00
Nicolò Ribaudo
d291edbdf1 v7.12.13 2021-02-03 01:59:31 +01:00
Nicolò Ribaudo
10978bb65a
[babel 8] Use the JSX automatic runtime by default (#12630)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
Co-authored-by: Arun Kumar Mohan <arunmohandm@gmail.com>
2021-01-19 01:41:07 +01:00
Daniel Arthur Gallagher
e8b08523f4
docs: add package-specific documentation links (#12531)
[skip ci]
2021-01-06 14:11:53 +01:00
Nicolò Ribaudo
d88c60cea9 v7.12.12 2020-12-23 14:55:59 +01:00
Zen
e08f68bf61
Skip discriminant when renaming starting from SwitchStatement (#12530) 2020-12-22 03:10:43 +01:00
Nicolò Ribaudo
bfb51362c7
Fix annex B block function hoisting semantics (#12512) 2020-12-16 18:42:00 +01:00
Nicolò Ribaudo
a1acfba387 v7.12.11 2020-12-16 00:55:11 +01:00
vitorveiga
90fb8d275e
fix: handle block-level function declaration (#11801) 2020-12-15 18:22:15 +01:00
Nicolò Ribaudo
208acb1d6c
Use require.resolve instead of the resolve package (#12439) 2020-12-04 08:57:09 +01:00
Álvaro Mondéjar
b649f8d192
Fix packages documentation README links. (#12289) 2020-10-30 21:19:21 +01:00
Nicolò Ribaudo
a967910b8b
Throw a TypeError when reassigning a const (#12252) 2020-10-25 22:30:28 +01:00
Nicolò Ribaudo
ed498a772b
Use workspace:* for devDependencies (again) (#12217)
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
2020-10-19 18:32:06 +02:00
Nicolò Ribaudo
7f4b83833f v7.12.1 2020-10-16 00:36:30 +02:00
Huáng Jùnliàng
eec01fe078
chore: use workspace:* for dev deps (#12186) 2020-10-15 14:03:50 -04:00
Huáng Jùnliàng
3fad7eab9b
Use Yarn 2 (#11962)
* chore: use yarn 2

* chore: remove redundant yarn locks

* chore: remove publishEslintPkg

* chore: remove redundant make bootstrap

* Update .yarnrc.yml

Co-authored-by: Kristoffer K. <merceyz@users.noreply.github.com>

* chore: use workspace protocol for eslint packages in the root

Co-Authored-By: merceyz <merceyz@users.noreply.github.com>

* chore: pin caniuse-lite versions

Testcases in packages/babel-preset-env/test/fixtures/debug/browserslists-defaults-not-ie
depends on specific caniuse-lite versions. We pinned the version here
so we don't have to deal with fixture different in e2e-tests
where all deps will be updated and tested.

* chore: resolve yarn install warnings

* chore: update yarn cache path on circle/travis

* chore: add yarn deduplicate plugin

* chore: deduplicate lock files

* chore: move devDependencies to leaf packages

* chore: remove @yarnpkg/plugin-constraints

* chore: remove unused dedupe options

* test: fix unwanted self reference

* chore: remove output-file-sync dependency

* chore: update browserify to 16.5.2

Co-authored-by: Kristoffer K. <merceyz@users.noreply.github.com>
2020-08-25 14:37:30 -04:00
Justin Ridgewell
a5bc48661b
Isolated exec tests (#11531)
* Run exec tests in fresh contexts

* Reevaluate modules in every context

* Cache module code when running tests

* Eliminate weakmap accesses as much as possible

* Remove old multiline usage

* Using bundled polyfill to significantly increase performance

The individual requires for each file were the part that was sooooo slow.

* Drop LRU cache size

* Fixes

* Fix test

Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
2020-08-10 18:57:48 -04:00
Huáng Jùnliàng
953ae82159 v7.11.1 2020-08-04 17:58:35 -04:00
Huáng Jùnliàng
c41dcd045b
fix: ensure […map.keys] can be correctly transformed in loose mode (#11901) 2020-07-31 14:26:22 -05:00
Huáng Jùnliàng
f7964a9ac5 v7.10.5 2020-07-14 14:10:36 -04:00
Huáng Jùnliàng
5dd64ecc4a
Disallow duplicated AST nodes (#11807) 2020-07-14 08:32:16 -05:00
James Addison
bff6298578
Reduce dependency on lodash functions: values, extends (#11798)
* Replace lodash 'values' usage with Object.keys => .map(obj[key])

* Block scoping: refactor letReferences, outsideLetReferences as objects of type Map

* Remove lodash dependency from babel-plugin-transform-block-scoping

* Fixup: Add missing Object.keys call

* Fixup: Update remaining property accessors

* Coerce Map.values() iterator results into an array via spread operator

* Fixup: Map.put -> Map.set

* Fixup: undo incorrect variable de-duplication

* Replace array-spread-plus-map combination with Array.from call

* Extract an extendMap function as an attempt to create an optimization boundary

* Experiment: cast objects to string (eliminates one Map/object difference per https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map )

* Fixup: perform String cast on map keys, not values

* Revert "Fixup: perform String cast on map keys, not values"

This reverts commit abdd147438fa74f51ac50ef1f96bb462810cd3f2.

* Revert "Experiment: cast objects to string (eliminates one Map/object difference per https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map )"

This reverts commit a4035c885b37bfd6e926a0362bda9dcf5b5a52c2.

* Experiment: filter keys via Object.prototype.hasOwnProperty.call

* Revert "Experiment: filter keys via Object.prototype.hasOwnProperty.call"

This reverts commit 491c093f213c6229815b2e6dc9243245376265b0.

* Migrate back from Map-based reference storage to Object-based storage; access performance appears much improved for Object property access

* Revert "Migrate back from Map-based reference storage to Object-based storage; access performance appears much improved for Object property access"

This reverts commit 2119acc7f0d78ced3b9ad77820b4b72e5ad67475.

* Iterate over a clone of outsideRefs keys

* Revert "Extract an extendMap function as an attempt to create an optimization boundary"

This reverts commit 85689f2bfc180d0b5c0e674e5de7954470c7ec69.

* Fixup: migrate remaining Object property access to Map.get in tdz module
2020-07-08 13:17:04 +02:00
Brian Ng
58cfaf20ee
Fix break/continue when switch is nested inside loop (#11802)
* Fix break/continue when switch is nested inside loop

* merge retCheck
2020-07-07 18:38:11 -04:00
Huáng Jùnliàng
7fd40d86a0 v7.10.4 2020-06-30 09:04:22 -04:00
Nicolò Ribaudo
88f57a7ea6 v7.10.1 2020-05-27 21:56:37 +00:00
Saulo Santiago
242d9e0b20
Use repository.directory field in package.json files (#11625)
Co-authored-by: Nicolas Stepien <567105+nstepien@users.noreply.github.com>
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2020-05-27 16:32:25 +02:00
Nicolò Ribaudo
5da2440adf v7.10.0 2020-05-26 21:20:43 +00:00
Nicolò Ribaudo
31b361b736
Use ?. where it represents the intended semantics (#11512) 2020-05-09 23:31:50 +02:00