Devin J. Pohly
1796f62311
Parenthesize function at start of sequence
...
The firstInStatement function was missing the first child of a
SequenceExpression because it needs to check both the type of the parent
*node* and the name of the parent *path element*, which are not the same
in this case.
This fix is a "minimal change" style; it should be correct even if it's
not beautiful. A cleaner fix would probably involve changing the way
the loop finds nodes.
2022-02-04 08:56:12 -06:00
Devin J. Pohly
a906dd1e63
Add test for \u2028 and \u2029 pretty-printing
2022-02-03 20:37:49 -06:00
Devin J. Pohly
7767878ff9
Fix pretty-printing strings with \u2028 or \u2029
...
These two characters are considered ordinary characters by JSON but line
terminators by ECMAScript (prior to ES2019). When pretty-printing a
string containing either character, JSON.stringify leaves it unescaped.
The result in recast.prettyPrint is that fromString, which follows
ECMAScript definitions, converts it mistakenly to a newline character.
Escaping these characters manually when the intent is to generate
ECMAScript (rather than JSON) eliminates the problem.
2022-02-03 14:28:04 -06:00
dependabot[bot]
daab533d91
Bump @babel/preset-env from 7.12.13 to 7.16.11
...
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env ) from 7.12.13 to 7.16.11.
- [Release notes](https://github.com/babel/babel/releases )
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md )
- [Commits](https://github.com/babel/babel/commits/v7.16.11/packages/babel-preset-env )
---
updated-dependencies:
- dependency-name: "@babel/preset-env"
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-01-21 11:04:53 +00:00
Ben Newman
4b1fc1678f
Bump npm version to 0.21.0.
2021-12-02 15:31:59 -05:00
Ben Newman
c76dbfaa3a
Merge pull request #1010 from benjamn/update-ast-types-to-0.15.2
...
Update `ast-types` dependency to version 0.15.2
2021-12-02 15:30:00 -05:00
Ben Newman
abacfa70c3
Allow pretty-printing TopicReference AST nodes.
...
https://github.com/babel/babel/pull/13191
2021-12-02 15:12:45 -05:00
Ben Newman
9a55bb1bc0
Allow pretty-printing V8IntrinsicIdentifier AST nodes.
...
https://github.com/babel/babel/pull/10148
2021-12-02 15:12:44 -05:00
Ben Newman
ab5b87d3fb
Allow pretty-printing DecimalLiteral AST nodes.
2021-12-02 15:12:44 -05:00
Ben Newman
8e542935d0
Regularize printing of node.extra for Literal subtypes.
2021-12-02 15:12:44 -05:00
Ben Newman
01a532cd4d
Allow pretty-printing TSIntrinsicKeyword AST nodes.
2021-12-02 15:12:44 -05:00
Ben Newman
15f91e24fe
Allow pretty-printing Flow [Optional]IndexedAccessType AST nodes.
2021-12-02 15:12:44 -05:00
Ben Newman
a52c62d779
Allow pretty-printing ModuleExpression AST nodes.
2021-12-02 15:12:44 -05:00
Ben Newman
066138caad
Allow pretty-printing {Record,Tuple}Expression AST nodes.
...
I chose not to support the `{|...|}` and `[|...|]` syntax, in favor of
`#{...}` and `#[...]`, since that's where TC39 seems to be headed (and
it's shorter and easier to print): https://github.com/tc39/proposal-record-tuple/issues/10
2021-12-02 15:12:44 -05:00
Ben Newman
8f1bcee915
Allow pretty-printing ImportAttribute AST nodes.
...
Like https://github.com/babel/babel/pull/11641 , but updated to reflect
the current AST spec: https://github.com/babel/babel/blob/main/packages/babel-parser/ast/spec.md#imports
2021-12-02 15:12:44 -05:00
Ben Newman
dbf2d78e93
Allow pretty-printing StaticBlock AST nodes.
2021-12-02 15:12:44 -05:00
Ben Newman
824a401f0b
Add some :any types to catch parameters in tests.
2021-12-02 15:12:44 -05:00
Ben Newman
dc1c6abb3a
Rename test/es6tests.ts to test/ecmascript.ts.
2021-12-02 15:12:44 -05:00
Ben Newman
9654fa4221
Update ast-types dependency to version 0.15.2.
2021-12-02 15:12:41 -05:00
dependabot[bot]
1f340cb47d
Bump @types/glob from 7.1.3 to 7.2.0 ( #994 )
2021-11-29 12:10:22 -05:00
dependabot[bot]
b241c420ef
Bump glob from 7.1.6 to 7.2.0 ( #988 )
2021-11-29 12:10:13 -05:00
Ben Newman
3741e4d22c
Convert package-lock.json to lockfileVersion:2 for npm v7.
2021-09-11 18:54:19 -04:00
Andreas Källberg
5dfb93a8e4
Update source map example to be less misleading
...
Fixes #76
2021-09-11 20:35:49 +08:00
dependabot[bot]
0f9d5cc0fb
Bump mocha from 8.2.1 to 9.0.2 ( #966 )
2021-07-22 18:51:19 -04:00
Ben Newman
fbf6e2d4aa
Updating typescript from v3.9.7 to v4.3.5 ( #972 )
...
Closes #971 .
2021-07-22 18:51:03 -04:00
Ben Newman
f16d0cbc59
Bump npm version to 0.20.5.
2021-07-22 18:36:36 -04:00
Ben Newman
a4b8baa39a
Add Node.js 16.x to the GitHub Actions test rotation.
2021-07-22 16:52:28 -04:00
dependabot[bot]
e8f0f83f84
Bump eslint from 7.19.0 to 7.31.0 ( #967 )
...
Bumps [eslint](https://github.com/eslint/eslint ) from 7.19.0 to 7.31.0.
- [Release notes](https://github.com/eslint/eslint/releases )
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md )
- [Commits](https://github.com/eslint/eslint/compare/v7.19.0...v7.31.0 )
2021-07-22 16:52:04 -04:00
dependabot[bot]
542af83c21
Bump @babel/core from 7.11.6 to 7.14.8 ( #962 )
2021-07-22 16:51:24 -04:00
dependabot[bot]
88ca887d3d
Bump lodash from 4.17.20 to 4.17.21 ( #913 )
2021-07-22 16:41:54 -04:00
dependabot[bot]
3b98084d2f
Bump @types/node from 14.14.22 to 16.4.0 ( #964 )
...
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node ) from 14.14.22 to 16.4.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases )
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node )
2021-07-22 16:41:35 -04:00
dependabot[bot]
22788282ec
Bump browserslist from 4.16.3 to 4.16.6 ( #929 )
...
Bumps [browserslist](https://github.com/browserslist/browserslist ) from 4.16.3 to 4.16.6.
- [Release notes](https://github.com/browserslist/browserslist/releases )
- [Changelog](https://github.com/browserslist/browserslist/blob/main/CHANGELOG.md )
- [Commits](https://github.com/browserslist/browserslist/compare/4.16.3...4.16.6 )
2021-07-22 16:41:19 -04:00
dependabot[bot]
0b25bca470
Bump glob-parent from 5.1.1 to 5.1.2 ( #936 )
...
Bumps [glob-parent](https://github.com/gulpjs/glob-parent ) from 5.1.1 to 5.1.2.
- [Release notes](https://github.com/gulpjs/glob-parent/releases )
- [Changelog](https://github.com/gulpjs/glob-parent/blob/main/CHANGELOG.md )
- [Commits](https://github.com/gulpjs/glob-parent/compare/v5.1.1...v5.1.2 )
2021-07-22 16:41:06 -04:00
dependabot[bot]
f39a0cfeca
Bump flow-parser from 0.135.0 to 0.156.0 ( #965 )
...
Bumps [flow-parser](https://github.com/facebook/flow ) from 0.135.0 to 0.156.0.
- [Release notes](https://github.com/facebook/flow/releases )
- [Changelog](https://github.com/facebook/flow/blob/master/Changelog.md )
- [Commits](https://github.com/facebook/flow/compare/v0.135.0...v0.156.0 )
2021-07-22 16:40:50 -04:00
dependabot[bot]
13dcaa053f
Bump @babel/parser from 7.12.14 to 7.14.8 ( #963 )
2021-07-22 16:40:37 -04:00
dependabot[bot]
4678640f57
Bump tslib from 2.0.3 to 2.3.0 ( #940 )
2021-07-22 16:40:23 -04:00
Oskari Noppa
d8946c6a03
Print Flow FunctionTypeAnnotation.typeParameters ( #961 )
...
Fixes #960
2021-07-22 16:39:52 -04:00
Georgii Dolzhykov
7de50fc7d3
Replace babylon → babel in README, improve error in parser/babel
2021-03-19 22:31:11 +02:00
Nick Heiner
cecf507595
Update README.md
...
Adding a note about a gotcha that I spent some time working out. Feel free to put the note somewhere else if what I did isn't the right organization.
2021-02-24 10:22:13 -05:00
dependabot[bot]
0a1260c211
Bump @babel/preset-env from 7.11.5 to 7.12.13 ( #847 )
...
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env ) from 7.11.5 to 7.12.13.
- [Release notes](https://github.com/babel/babel/releases )
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md )
- [Commits](https://github.com/babel/babel/commits/v7.12.13/packages/babel-preset-env )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-03 12:42:48 -05:00
dependabot[bot]
ac3f35dca5
Bump eslint from 7.15.0 to 7.19.0 ( #846 )
...
Bumps [eslint](https://github.com/eslint/eslint ) from 7.15.0 to 7.19.0.
- [Release notes](https://github.com/eslint/eslint/releases )
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md )
- [Commits](https://github.com/eslint/eslint/compare/v7.15.0...v7.19.0 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-03 12:40:10 -05:00
dependabot[bot]
72a06d3a97
Bump @typescript-eslint/parser from 4.9.1 to 4.14.2 ( #845 )
...
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser ) from 4.9.1 to 4.14.2.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases )
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md )
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.14.2/packages/parser )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-03 12:39:54 -05:00
dependabot[bot]
9a04f43562
Bump @babel/parser from 7.12.13 to 7.12.14 ( #848 )
...
Bumps [@babel/parser](https://github.com/babel/babel/tree/HEAD/packages/babel-parser ) from 7.12.13 to 7.12.14.
- [Release notes](https://github.com/babel/babel/releases )
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md )
- [Commits](https://github.com/babel/babel/commits/v7.12.14/packages/babel-parser )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-03 12:39:33 -05:00
dependabot[bot]
c6a3b632b9
Bump @types/mocha from 8.0.3 to 8.2.0 ( #822 )
...
Bumps [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha ) from 8.0.3 to 8.2.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases )
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-03 10:57:56 -05:00
Ben Newman
16b902379e
Add Node.js 15.x to the GitHub Actions test rotation.
2021-02-03 10:54:48 -05:00
dependabot[bot]
8facff3d8e
Bump mocha from 8.1.3 to 8.2.1 ( #820 )
...
Bumps [mocha](https://github.com/mochajs/mocha ) from 8.1.3 to 8.2.1.
- [Release notes](https://github.com/mochajs/mocha/releases )
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md )
- [Commits](https://github.com/mochajs/mocha/compare/v8.1.3...v8.2.1 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-03 10:52:49 -05:00
dependabot[bot]
2871177370
Bump prettier from 2.1.1 to 2.2.1 ( #821 )
...
Bumps [prettier](https://github.com/prettier/prettier ) from 2.1.1 to 2.2.1.
- [Release notes](https://github.com/prettier/prettier/releases )
- [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md )
- [Commits](https://github.com/prettier/prettier/compare/2.1.1...2.2.1 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-03 10:52:38 -05:00
dependabot[bot]
8ec8984b18
Bump @types/node from 14.10.0 to 14.14.22 ( #841 )
...
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node ) from 14.10.0 to 14.14.22.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases )
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-03 10:52:25 -05:00
dependabot[bot]
7b5138428a
Bump @babel/parser from 7.11.5 to 7.12.13 ( #844 )
...
Bumps [@babel/parser](https://github.com/babel/babel/tree/HEAD/packages/babel-parser ) from 7.11.5 to 7.12.13.
- [Release notes](https://github.com/babel/babel/releases )
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md )
- [Commits](https://github.com/babel/babel/commits/v7.12.13/packages/babel-parser )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-03 10:52:04 -05:00
Brian Donovan
dd7c5ec15c
Merge pull request #785 from benjamn/dependabot/npm_and_yarn/tslib-2.0.3
...
Bump tslib from 2.0.1 to 2.0.3
2020-12-08 08:17:53 -08:00