Commit Graph
520 Commits
Author SHA1 Message Date
Huáng JùnliàngandGitHub 347e79fd82 Fix failing Node.js 20 tests (#17191)
* add itSatisfies, itNegate and describeSatisfies

* replace ">=22.12.0" by "^20.19.0 || >= 22.12.0"

* update helper-define-polyfill-provider

* update test fixtures

* small cleanup to retry CI

* Revert "small cleanup to retry CI"

This reverts commit 7ebc90541217e62b2e01cc13a1cc0fa6b1e48285.

* try builtin npm version

* use versionHasRequireESM
2025-03-20 09:31:42 -04:00
Huáng JùnliàngandGitHub 9f01a9b203 fix(typescript): disallow TSInstantiationExpression in LHS (#17154)
* add some supported error codes

* update typescript commit

* fix(typescript): disallow TSInstantiationExpression in LHS

This commit essentially reverts https://github.com/babel/babel/pull/16476

* update error codes handling and allowlist

* remove invalid test
2025-02-27 13:25:02 -05:00
Huáng JùnliàngandGitHub be73950e0e Eslint parser cleanup (#17144) 2025-02-21 10:03:54 -08:00
Babel BotandGitHub 6b2e633e64 Update test262 (#17143)
chore: update test262 to b3f67f4aafc9372ab7bfaea4290413b3e241f6a5
2025-02-20 17:47:15 -08:00
Nicolò RibaudoandGitHub 6c570563fb [babel 8] Use @babel/types for parser's return type (#17117) 2025-02-14 12:12:13 +01:00
Huáng JùnliàngandGitHub 1f6667ac8b [Babel 8] Create TSTemplateLiteralType (#17066)
* breaking: create TSTemplateLiteralType

* update test fixtures

* ignore TSTemplateLiteralType in printer test

* purge failing prettier tests

* rename expressions to types

* fix: generate TSLiteralType when the template does not contain types

* restore template literals transform

* update test fixtures

* define TSTemplateLiteralType for Babel 7

Since the generator requires the types information

* refactor: extract _printTemplate helper

* Apply template literal range fixes to TSTemplateLiteralType
2025-01-27 10:00:12 -05:00
Babel BotandGitHub d32577412a Update test262 (#17067)
chore: update test262 to 5f98e1d39d1d9ef7891104aad2f51cbd7a1ab4ca
2025-01-17 13:56:24 +08:00
Babel BotandGitHub 36c042ac9b Update test262 (#17056)
chore: update test262 to 122912d54b7c5589b5847c54186a77dc6a9945db
2025-01-10 12:46:05 +08:00
c81223d724 [Babel 8] Create TSEnumBody for TSEnumDeclaration (#16979)
* update babel-types definitions

* breaking: create TSEnumBody for Babel 8

* update test fixtures

* breaking: remove unused initializer field

* fix typings

* print TSEnumBody

* support Babel 8 AST in typescript transform

* fix: inherit enum member's comments

* add TSEnumBody printer method

* polish: adjust inner comments for TSEnumDeclaration

* fix printer test

* define TSEnumBody for Babel 7

* update artifacts

* fix: adapt to Babel 8 AST

* purge failing prettier test due to the AST change

* Update packages/babel-generator/src/generators/typescript.ts

Co-authored-by: Nicolò Ribaudo <[email protected]>

* fix typings

* print trailing comma only according to original source

* update test fixtures

* modify according to the changed interface

---------

Co-authored-by: Nicolò Ribaudo <[email protected]>
2025-01-09 15:34:17 -05:00
liuxingbaoyuandGitHub e20a12d698 chore: Update TS 5.7 (#17053) 2025-01-09 17:36:20 +01:00
Huáng JùnliàngandGitHub b3163c963b Support flow jsx opening element type arguments (#17028)
* refactor: rename tsInNoContext to tsInTopLevelContext

* fix: support type arguments in JSXOpeningElement

* add test cases

* update per Babel 8 AST

* define typeArguments and remove it in flow transform

* update generated AST types

* fix typing errors

* e2e: ignore the broken prettier test

The test is broken because we now support typeArguments in JSXOpeningElement

* update test allowlist
2025-01-08 11:28:12 -05:00
Babel BotandGitHub 7eb1b6209e Update test262 (#17033)
chore: update test262 to c4317b0cb578d3fe7940f65b27162638efb9b34d
2024-12-20 12:06:34 +01:00
fisker CheungandGitHub 1eccb72b32 Unpin Node.js version for Prettier E2E test (#17027)
* Unpin Node.js version for Prettier E2E test

* Remove outdated modifications
2024-12-16 12:43:36 +01:00
Huáng JùnliàngandGitHub e5ae8cdaea Fix failing CI due to Node.js 22.12 (#17022)
* suppress REQUIRE_ESM warning

* update runtime-integration node version segments

* Use node.js 22.11 for prettier test
2024-12-13 13:55:01 -05:00
Babel BotandGitHub e14c2539da Update test262 (#17021) 2024-12-13 12:07:06 +01:00
Huáng JùnliàngandGitHub 26eb020937 [Babel 8]: rename typeParameters to typeArguments for TSClassImplements and TSInterfaceHeritage (#17017)
* breaking: rename typeParameters to typeArguments for TSHeritage

* chore: add trailing linebreak to options.json

* update test fixtures

* add missing todo item

* breaking: remove TSExpressionWithTypeArguments generator

* typings: export deprecated AST types
2024-12-11 16:41:32 -05:00
d678dbefb8 Allow the dynamic import.defer() form of import defer (#17011)
* chore: update test262 to eefc5cf367b999768445432e167606fd1acf1734

* update

* fix babel8

---------

Co-authored-by: Babel Bot <[email protected]>
2024-12-06 15:28:54 +01:00
Huáng JùnliàngandGitHub bebf9e5bb4 ci: add ember e2e test (#16998) 2024-12-05 12:29:31 -05:00
Huáng JùnliàngandGitHub eabebd4cd7 Add generate-babel-7-tests script (#16981) 2024-11-29 08:56:37 -05:00
Nicolò RibaudoandGitHub 4bc0df93a1 Update @babel/* dependencies (#16933) 2024-10-25 16:43:25 +02:00
Nicolò RibaudoandGitHub 2818e21eda Enable import attributes parsing by default (#16850)
* Enable import attributes parsing by default

* Remove plugin from tests

* Update fixtures

* Fix failures

* `make build`

* Fix TS errors

* Fix

* Update .d.ts

* Move in core

* [babel 8] Remove syntax plugins from preset-env

* Update fixtures

* Fix ESM build of Babel 7 and standalone

* Update flow allowlist

* Update parser fixtures for Babel 8

* Update generator tests

* Update parser test

* Update standalone

* Do not run import attribtues plugin test in Babel 8

* Make tests pass in babel 8

* Fix Babel 8 build

* [babel 8] Stop printing legacy "with" attributes

* fix prettier integration test

* Fix Babel 8 compat in syntax-import-attributes

* Try fix

* Do not error for the removed `importAttributes` plugin

* Skip a test in babel7/8 compat e2e

* Throw an error when using removed option from the parser

* Fixes after rebase

* Raise `ImportCallArity` also when `createImportExpressions`

* Fix linting
2024-10-24 20:33:39 +02:00
Nicolò RibaudoandGitHub c28a4d60a0 Rename proposal-json-modules to transform-json-modules (#16924) 2024-10-24 17:44:19 +02:00
5b16d8345a Fix loading of modules with TLA in Node.js 23 (#16926)
Co-authored-by: Huáng Jùnliàng <[email protected]>
2024-10-24 11:16:13 +02:00
Nicolò RibaudoandGitHub a1609604de Always enable parsing of Flow enums (#16841) 2024-10-23 16:02:36 +02:00
Huáng JùnliàngandNicolò Ribaudo 5cbbe04ae1 test: add node 23 to ci matrix
chore: add itLte to repo-utils

test(core): update require(ESM) test fixtures

update node-flags-with-value.json

add node 23 test job

add node 23 to ESM test

ci: move env config to the step

try to remove node options from cjs build tests

fix: pass through process env in register tests

try to inline NODE_OPTIONS env

test: remove special handling of the BABEL_8_BREAKING env

fix undeclared dev deps

fix: default externalHelpers to true

Previously we try to resolve "@babel/plugin-external-helpers", but this package is never listed in the dependencies of babel-helper-fixtures, and any other babel plugins that used babel-helper-fixtures. Since we resolve external-helpers by the monorepo library path, it is not necessary to actually resolve @babel/plugin-external-helpers.

test: improve "options merge backwards" test

This test was introduced in 2bdc222c0b, the motivation is to ensure that plugins is applied before presets.

test: avoid @babel/preset-react self-reference

specify babel-eslint-tests dependency

specify babel-node test dependency

fix: directory import is not supported in node < 23

pass through process env in spawnNodeAsync tests

use --disable-warning on node 23 only
2024-10-23 16:00:33 +02:00
liuxingbaoyuandGitHub 78125495a9 fix: Accidentally publishing useless files (#16917) 2024-10-22 15:30:01 +02:00
Babel BotandGitHub ccbb90072c Update test262 (#16910)
chore: update test262 to 0645461999632a17426e45d044ee519a0f07d022
2024-10-18 13:58:30 -04:00
Nicolò RibaudoandGitHub bcda546792 Cleanup prettier e2e test (#16890) 2024-10-09 14:59:47 +02:00
Babel BotandGitHub 1f093e0717 Update test262 (#16881)
chore: update test262 to 06ea308d144b323dc20f976e80c32f085bebbe40
2024-10-06 16:23:30 +08:00
Nicolò RibaudoandGitHub ba3ca1c876 Fix prettier Babel 8 test (#16876) 2024-09-30 20:02:10 -04:00
Babel BotandGitHub 55b42827e9 Update test262 (#16867) 2024-09-27 10:21:31 +02:00
5fef7a285d [Babel 8] Remove minimal,smart option of Pipeline Operator (#16801)
Co-authored-by: Nicolò Ribaudo <[email protected]>
2024-09-16 16:47:17 +02:00
liuxingbaoyuandGitHub fa932030cf Remove BABEL_TYPES_8_BREAKING flag and enable it by default (#16817) 2024-09-16 14:29:05 +02:00
Babel BotandGitHub 46bb578012 Update test262 (#16832)
chore: update test262 to 4bdf9782207d12dfd0551bb6f30a2021a6f987cd
2024-09-13 08:58:04 +02:00
liuxingbaoyuandGitHub bbf3cd8f57 chore: Enable more lint rules (#16827)
rules
2024-09-11 20:58:45 +02:00
fisker CheungandGitHub 434b21e9e9 Enable unicorn/prefer-set-has rule (#16822)
* Enable `unicorn/prefer-set-has` rule

* Run `--fix`

* `yarn dedupe`

* Fix

* fix
2024-09-10 13:19:44 -04:00
liuxingbaoyuandGitHub 1a2e2f9730 Fix parallel-tsc may throw exception (#16819) 2024-09-08 19:58:58 +02:00
Nicolò RibaudoandGitHub 7a3993e871 Remove importReflection parser plugin (#16808) 2024-09-07 10:53:20 +02:00
Nicolò RibaudoandGitHub a9b2dacf70 Archive syntax-import-reflection and syntax-decimal (#16809) 2024-09-06 23:49:06 +02:00
60cd160a42 [Babel 8] Remove decimal from parser (#16741)
* remove

* test

* error msg

* e2e

* Update packages/babel-standalone/test/preset-stage-1.test.js

Co-authored-by: Huáng Jùnliàng <[email protected]>

* review

---------

Co-authored-by: Huáng Jùnliàng <[email protected]>
2024-09-03 16:03:43 -04:00
liuxingbaoyuandGitHub c666b2c5ec Simplify test fixtures (#16793) 2024-09-03 21:09:15 +02:00
Babel BotandGitHub 42eb0fc049 Update test262 (#16765) 2024-08-23 14:55:49 +02:00
liuxingbaoyuandGitHub a180b5902a [Babel 8] Split typeParameter of TSMappedType (#16733) 2024-08-23 13:58:44 +02:00
Nicolò RibaudoandGitHub 092b846804 Always return a boolean from bool() in gulpfile (#16757) 2024-08-22 11:22:40 +02:00
7a06e68424 Clean all always enabled parser plugins (#16572)
Co-authored-by: Nicolò Ribaudo <[email protected]>
2024-08-12 15:45:03 +02:00
Huáng JùnliàngandGitHub 6594c3c374 Discontinue babel-eslint-config-internal (#16718) 2024-08-10 11:27:07 -04:00
Nicolò RibaudoandGitHub 0e423477d9 Ignore devDependencies when generating tsconfig.json (#16659) 2024-07-31 18:20:06 +02:00
236e917ffa add nextjs-10 e2e-test (#16700)
* add nextjs-10 e2e test

* apply debug mode patch

* fix file permission

* update fixture setup

* fix registry setup

* run nextjs10 e2e test only

* copy contents

* Revert "run nextjs10 e2e test only"

This reverts commit 23d61047e902817cd99459c2374e5a15a1d66940.

* ensure side effects

* Add transform-runtime for regenerator

* Fix test

---------

Co-authored-by: Nicolò Ribaudo <[email protected]>
2024-07-31 13:41:15 +02:00
Nicolò RibaudoandGitHub 9db283ea8c Update Babel and compile JSON imports with uncheckedRequire (#16687) 2024-07-30 13:36:53 +02:00
Nicolò RibaudoandGitHub f894edde64 Add eslint-plugin-regexp (#16680) 2024-07-29 17:42:43 +02:00