600 Commits

Author SHA1 Message Date
Nicolò Ribaudo
2f755ef052 v7.12.17 2021-02-18 15:58:43 +01:00
Nicolò Ribaudo
7c9dd78b8d
Fix import assertions type definitions (#12794)
* Fix import assertions type definitions

* Ensure that an array validator is followed by assertEach
2021-02-12 10:10:05 +01:00
Nicolò Ribaudo
d291edbdf1 v7.12.13 2021-02-03 01:59:31 +01:00
Karan Sapolia
b63be942ce
Use native ESM for dev scripts (#12296)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-01-30 18:36:21 +01:00
Bogdan Savluk
d98418efbe
Convert @babel/traverse to TypeScript (#12488)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-01-24 01:33:09 +01:00
Chris West
bd4590e546
fix: cloneNode(deep, withoutLoc) handles absent comments (#12602)
This fragment (maybe all fragments?) throw during cloning, as
'comments' is unset here. Handle it being unset, by returning
undefined.
2021-01-12 20:40:23 -05:00
Daniel Arthur Gallagher
e8b08523f4
docs: add package-specific documentation links (#12531)
[skip ci]
2021-01-06 14:11:53 +01:00
Niklas Mischkulnig
fdb5829a60
Use isIdentifierChar instead of regex for toIdentifier (#12575)
* Use isIdentifierChar instead of regex for toIdentifier

* Apply suggestions from code review

Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>

* Undo dep

* Update packages/babel-types/test/converters.js

* Add testcase starting with a number

* Add test for non-ascii starting character

Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
2020-12-31 11:22:46 -05:00
Nicolò Ribaudo
d88c60cea9 v7.12.12 2020-12-23 14:55:59 +01:00
Nicolò Ribaudo
b9deeb458b
Restore @babel/types support for old TS versions (#12521) 2020-12-17 18:34:23 +01:00
Nicolò Ribaudo
a1acfba387 v7.12.11 2020-12-16 00:55:11 +01:00
Bogdan Savluk
2f6de2f0c5
Improve AST node definitions in @babel/types (#12510) 2020-12-15 23:48:58 +01:00
Nicolò Ribaudo
0ea065014b
Mark optional AST fields in generated type definitions (#12511) 2020-12-15 23:19:19 +01:00
Huáng Jùnliàng
fc82169b4e
refactor: move @babel/helper-validator-identifier to ts (#12409)
* refactor: rename helper-validator-identifier to ts

* fix flow errors
2020-12-11 17:41:56 -05:00
Bogdan Savluk
1290d215f1 Convert @babel/types to TS (#12431)
* babel-types flowts convert
* babel-types code generation updates
* babel-types add more generated types to src (copy logic from scripts/typescript)
* babel-types update generateBuilders to specify exact argument types
* babel-types fix deprecated types generation
* babel-types fixes
* babel-types fix potential bug
* babel-types update generateBuilders, to include proper return types
* babel-types backport types from generated index.d.ts to be included in sources
* babel-types fixes
* babel-types avoid export of builders starting with upper case in ts sources
* babel-types
* babel-types todo updates, small fixes
* babel-types generate helpers
* babel-types remove typescript definitions generation
* babel-types generate files
* babel-types copy d.ts file for deprecated ast node creators into lib folder
* babel-types use t as alias for ast node types namespace
* babel-types update generateBuilders script to use "t" as alias instead of "types"
* babel-types update deprecated builders generation to have more compact file
* babel-types publish the .d.ts file for `@babel/types`
* Publish the .d.ts file for `@babel/types`
* Fix flowcheck
* Prettier
* No need to lint generated .d.ts files (now they are generated by tsc)
* Run prepublish-prepare-dts from prepublish-build
* Fix Babel 8 tests
* Update codecov config
* babel-types more improvements
  - better type for gatherSequenceExpressions
  - mark createUnionTypeAnnotation as deprecated
  - fix createTSUnionType
  - babel-types better type for builder
  - other improvements from PR comments
* babel-types lint fix
* babel-types fix createTSUnionType
* Don't commit .d.ts file in lib, and rename "deprecated"->"uppercase" for builders
* Add back types for TS 3.7
* Update packages/babel-types/package.json
* Cleanup converters types

Co-Authored-By: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2020-12-10 21:22:10 +01:00
Bogdan Savluk
c0a8cbd989 Convert @babel/types to TS: rename files (#12431) 2020-12-10 21:22:10 +01:00
Huáng Jùnliàng
e5b2680756
Move some build steps to gulp (#12127)
* chore: move generate-standalone to gulp tasks

* move build-flow-typings to gulp tasks

* chore: move build-typescript-typings to gulp tasks

* move generate-type-helpers to gulp tasks

* chore: include build-typings and generate-type-helpers in gulp build

* update generate-standalone comments

* address review comments

* chore: revert build-typings refactor

* fix: run build-typings in build-no-bundle
2020-12-10 12:25:16 -05:00
Nicolò Ribaudo
e901454096 v7.12.10 2020-12-09 23:44:59 +01:00
Nicolò Ribaudo
c139d1602b
Prepare codebase for inline Babel 8 breaking changes (#12440) 2020-12-04 21:30:40 +01:00
Bogdan Savluk
2ca28d78e6
@babel/types: update OptionalCallExpression to support ArgumentPlaceholder (#12418) 2020-11-30 12:49:22 -05:00
Nicolò Ribaudo
645fe637f2
Fix t.isReferenced() for named re-exports (#12395) 2020-11-25 19:39:45 +01:00
Nicolò Ribaudo
23226d93d4 v7.12.7 2020-11-20 22:02:43 +01:00
Bogdan Savluk
0f838be944
improve asserts type annotations (#12341) 2020-11-16 11:21:30 -05:00
ExE Boss
3505eaadba
Add type definitions for assertion methods (#11883)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2020-11-10 16:42:25 +01:00
Nicolò Ribaudo
a9bc9becc5 Use TS3.7 when possible for @babel/type dts (#12317) 2020-11-09 23:17:24 +01:00
Nicolò Ribaudo
4a6fed1335 v7.12.6 2020-11-04 12:05:56 +01:00
Nicolò Ribaudo
dd5a977048
Revert "Mark ThisExpression and Super as Purish" (#12307) 2020-11-04 11:50:46 +01:00
Nicolò Ribaudo
a41da05ce9 v7.12.5 2020-11-03 23:30:17 +01:00
Álvaro Mondéjar
b649f8d192
Fix packages documentation README links. (#12289) 2020-10-30 21:19:21 +01:00
Sosuke Suzuki
ff6c3792bb
Make assertions optional and update AST spec (#12280) 2020-10-29 10:21:52 -05:00
Sosuke Suzuki
d04b4dd116
fix(babel-types): Add assertions to ExportAllDeclaration (#12273) 2020-10-29 08:24:56 -05:00
coderaiser
9eb661b285
fix: babel-types: ImportDeclaration: add assertions (#12263) 2020-10-27 08:58:25 -05:00
Nicolò Ribaudo
df908fc63b
Mark ThisExpression and Super as Purish (#12251)
* Mark `ThisExpression` as `Purish`

The other purish types are functions and literals, so I
guess it means "it doesn't have side effects"

* Super & tests

* Fix tests
2020-10-27 13:12:49 +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
Nicolò Ribaudo
726154c78e v7.12.0 2020-10-14 21:48:45 +02:00
Sven Sauleau
af8e0facc1
Parse import-assertions (#12139)
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2020-10-14 21:18:16 +02:00
Huáng Jùnliàng
f697e7995d Transform class static block (#12143)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
Co-authored-by: Brian Ng <bng412@gmail.com>
2020-10-14 21:16:24 +02:00
Huáng Jùnliàng
3ccca88178 Parse class static block (#12079)
Co-authored-by: Brian Ng <bng412@gmail.com>
2020-10-14 21:16:24 +02:00
Brian Ng
6830c90ac9
Support TypeScript mapped type 'as' clauses (#12129) 2020-10-14 20:16:22 +02:00
Nicolò Ribaudo
3fd963fdc8
[ts] Add support for template interpolations in types (#12131)
Co-authored-by: Brian Ng <bng412@gmail.com>
2020-10-14 20:15:42 +02:00
Nicolò Ribaudo
9f40d6fcd0
[ts] Add support for the "intrinsic" keyword (#12147) 2020-10-14 20:15:17 +02:00
Huáng Jùnliàng
21d7ee2610 String import/export specifier (#12091)
* feat: parse moduleExportName
* feat: add validators
* Support string specifier name in commonjs transform
* Support string specifier name in export-ns-from
* test: add loose testcases
* test: add testcases for amd and umd
* feat: support systemjs
* test: update fixtures fixed in #12110
* add plugin name typings
* test: rename test layout
* feat: implement under moduleStringNames flag
* chore: add plugin syntax module string names
* feat: support ModuleExportName as ModuleExportName
* test: update test fixtures
* fix flow errors
* docs: update AST spec
* feat: support { "some imports" as "some exports" }
* feat: support { "some imports" as "some exports" } in systemjs
* test: add test on `import { "foo" }`
* Address review comments
* add moduleStringNames to missing plugin helpers
* Apply suggestions from code review
* update test fixtures
* Update packages/babel-parser/src/parser/error-message.js
* update test fixtures

Co-Authored-By: Kai Cataldo <kai@kaicataldo.com>
Co-authored-by: Brian Ng <bng412@gmail.com>
2020-10-14 20:01:37 +02:00
Ryan Rhee
ebec7c8baf
[babel-types] Add extra property to BaseNode type (#12136) 2020-10-09 16:29:04 +02:00
Huáng Jùnliàng
e0b2bfb78f
fix: mark Pattern in CatchClause as scope (#12119) 2020-09-29 15:04:24 -04:00
Huáng Jùnliàng
af64ccb2b0 v7.11.5 2020-08-31 15:54:06 -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
Huáng Jùnliàng
45fdb87747 v7.11.0 2020-07-30 17:12:07 -04:00
Nicolò Ribaudo
eba4c3b6ed TypeScript 4.0: Support labeled tuple elements (#11754)
* TypeScript 4.0: Support labeled tuple elements

* More tests

* Disallow mixing labeled and unlabeled elements

* Update AST shape

* Enable test after rebase

* Allow labeled spread types

* Fix flow

* Add types and generator suport

* Update packages/babel-parser/src/plugins/typescript/index.js

* Prettier
2020-07-29 16:51:48 -04:00