Commit Graph
47 Commits
Author SHA1 Message Date
fisker Cheung 02f803ac8d JSON: Only allow +/- number in UnaryExpression (#10434) 2021-03-09 10:58:31 +08:00
fisker CheungandGeorgii Dolzhykov 8a1ee9ad1b Support JSON6 (#10456)
* Add test

* Support JSON6

* Test

* Print `null` instead of holes

* More tests

* Update changelog

* Style

* Minor refactor

* Fix AST clean

* Fix `Identifier` clean

* Fix AST compare

* Style

* Reword changelog

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2021-03-04 19:37:42 +02:00
fisker Cheung 2edfec5eda JSON: Better error message (#10452) 2021-03-02 13:42:49 +08:00
fisker Cheung ed9e9ab649 Improve json error code frame (#10433) 2021-03-01 10:04:09 +08:00
fisker Cheung 9324380c53 JSON: Disallow sparse array (#10443) 2021-03-01 09:53:32 +08:00
Sosuke Suzuki feacf82892 Update babel/parser to v7.12.17 (#10345) 2021-02-25 18:28:06 +08:00
fisker Cheung d544585d87 Make JSON parser stricter (#10346) 2021-02-23 13:33:10 +02:00
Georgii Dolzhykov a322cf152a Disable Babel error recovery for invalid escaped characters in identifiers (#10322) 2021-02-15 16:58:50 +02:00
dependabot[bot]andfisker Cheung d0829f8b95 Build(deps): Bump meriyah from 4.0.0 to 4.1.1 (#10283)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2021-02-11 00:51:41 +08:00
dependabot[bot]andfisker Cheung d0942b8fae Build(deps): Bump @babel/code-frame from 7.12.11 to 7.12.13 (#10226)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2021-02-04 09:42:00 +08:00
fisker Cheung 27700e5282 Add test to close issue 9102 (#9982) 2020-12-31 21:24:24 +09:00
dependabot[bot] 892a70e0d3 Build(deps): Bump @glimmer/syntax from 0.68.1 to 0.69.0 (#9862) 2020-12-10 10:53:49 +00:00
dependabot[bot]andfisker 21dd12d370 Build(deps): Bump @glimmer/syntax from 0.66.1 to 0.67.0 (#9762)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
2020-11-24 19:26:14 +08:00
Juriy Zaytsevandfisker 90abbb7924 [Glimmer] Preserve tilde comments (#9082)
Co-authored-by: fisker <lionkay@gmail.com>
2020-11-24 14:45:03 +08:00
Sosuke Suzukiandfisker Cheung 4cc149248a Support TypeScript 4.1 via typescript-estree (#9636)
* Update typescript and typescript-estree

* Add AST transformation for TSTemplateLiteralType

* Update tests for template-literal-types

* Fix transformChainExpression

* Update tests for key-remapping-in-mapped-types

* Implement recoverInvalidDecorators

* Update changelog

* Avoid typecheck error

* Add os.platform() shim

* Update config.js

* Update config.js

* Shim os.cpus

* Update `process.versions.node`

* Attempt to fix build

* Update ts parserOptions

* Fix code style

* Remove `errorOnUnknownASTType`, fix code style

* Use `[] ||` instead of `[] //`

* Fix hack

* Add invalid tests

* checkMissingDecorators

* Update tests

* Fix tests

* Add comment

* Revert "Implement recoverInvalidDecorators"

This reverts commit 27e7b46ed41df36fb585791117c85e1b2dab932c.

* Add ref pr link

* Simplify logic

* Don't transform `TSTemplateLiteralType`

* Add `TSTemplateLiteralType` as simple type

* Fix tests

* Update comments

* Add comment

* Fix logic

* Minor tweak

* use multiple parsers

* Update @typescript-eslint/typescript-estree to v4.8.0

* Switch to `parseWithNodeMaps`

* Rename `esNode` -> `esTreeNode`

* Update @typescript-eslint/typescript-estree to 4.8.1-alpha.1

* Use @typescript-eslint/typescript-estree 4.8.1

Co-authored-by: fisker Cheung <lionkay@gmail.com>
2020-11-18 10:59:58 +09:00
dependabot[bot] e73576a64b Build(deps): Bump @glimmer/syntax from 0.65.0 to 0.66.0 (#9693) 2020-11-17 07:59:26 +00:00
fisker Cheung 386759c6f7 Test: Allow multiple parsers in error test (#9648) 2020-11-16 15:19:50 +08:00
c91914e610 Build(deps): Bump @babel/parser from 7.12.3 to 7.12.5 (#9597)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: sosukesuzuki <aosukeke@gmail.com>
Co-authored-by: fisker <lionkay@gmail.com>
2020-11-06 19:30:42 +08:00
fisker Cheung bbd1f5d1d5 Remove for-each-in syntax (#9585) 2020-11-04 08:52:49 +08:00
Sosuke Suzukiandfisker f7554c62a2 Revert breaking changes related to adding pure css parser for minor releasing (#9500)
* revert without tests

* Downgrade postcss-scss and postcss-less

* Fix tests

* Revert "Make `isSCSS*` function stricter (#9093)"

This reverts commit 01f986bea9.

* Revert "Remove `css` parser from `isLessParser` check (#9092)"

This reverts commit c0bca1805d.

* Revert "Add pure css parser (#7933)"

This reverts commit 589ebf670b.

* Disable `parser-postcss.js` minify

* Try to fix build script

* Update fs.mjs

* Update fs.mjs

* Style

Co-authored-by: fisker <lionkay@gmail.com>
2020-10-31 22:22:35 +09:00
dependabot[bot]andfisker bc9db85490 Build(deps): Bump postcss-less from 3.1.4 to 4.0.0 (#9471)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
2020-10-26 09:46:00 +08:00
Sosuke Suzuki 3b7a7ba3c9 Update @babel/parser to 7.12 (#9408)
* Install babel/parser 7.12

* Add tests for babel/babel#12161

* Add test for babel/babel#12076

* Add test for babel/babel#12085

* Add test for babel/babel#12108

* Add test for babel/babel#12120

* Add test for babel/babel#12054

* Add test for babel/babel#12061

* Add test babel/babel#12093

* Add test for babel/babel#12065

* Add test for babel/babel#12111

* Add test for babel/babel#12072

* Switch syntax-module-attributes to syntax-import-assertion

* Support "String import/export specifier"

* Remove tests for module-attributes

* Add changelog

* Update to 7.12.3

* Fix by linter

* Fix by spellchecker

* Add tests for module attributes to errors

* Add error test for module string name with import

* Remove TSTypeCastExpression

* Add tests for funny import-assertions

* Update snapshots|

* Add more tests
2020-10-20 19:01:30 +09:00
fisker Cheung 3fe4666a85 Consistent parser errors (#9406) 2020-10-16 10:39:05 +08:00
fisker Cheung 9efeb8309e Update postcss-scss to v3 (#9210) 2020-09-27 08:49:16 +08:00
fisker Cheung b77da32a80 Update postcss to v8 (#9209)
* Update `postcss` v8

* Parser custom properties

* Improve logic

* Update lint script

* Fix node location

* Fix comments inside

* Add a test

* Test on `less` and `scss` too

* Fix empty prop print

* Clean

* Update `postcss`

* Exclude `regenerator`

* Test `no-semi`

* Add changelog

* Typo

* Apply review suggestion

* Style

* Simplify logic

* Remove error test, we don't throw on this anymore

* Style

* Update postcss

* Update postcss
2020-09-25 00:51:55 +08:00
dependabot[bot]andfisker 0983660aa8 Build(deps): Bump @babel/parser from 7.11.2 to 7.11.5 (#8947)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
2020-09-01 19:26:19 +08:00
fisker Cheung 589ebf670b Add pure css parser (#7933) 2020-08-28 13:07:49 +08:00
fisker Cheung d31ebf4619 Test: Improve coverage (#8811) 2020-08-21 09:43:24 +08:00
dependabot[bot]andfisker e2e0ddf08c Build(deps): Bump @babel/parser from 7.11.0 to 7.11.1 (#8914)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
2020-08-06 10:40:49 +08:00
fisker Cheung 797e93fc0a Support Decimal Proposal (#8901) 2020-08-05 11:04:30 +08:00
dependabot[bot]andfisker 8f58bffecf Build(deps): Bump @babel/parser from 7.10.5 to 7.11.0 (#8869)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
2020-08-03 21:13:19 +08:00
fisker Cheung 9ebe5adb54 Ensure comments for ignored node are printed (#8777) 2020-07-20 09:19:40 +08:00
dependabot[bot]andfisker f0285dc3d2 Build(deps): Bump @babel/parser from 7.10.4 to 7.10.5 (#8762)
* Build(deps): Bump @babel/parser from 7.10.4 to 7.10.5

Bumps [@babel/parser](https://github.com/babel/babel/tree/HEAD/packages/babel-parser) from 7.10.4 to 7.10.5.
- [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.10.5/packages/babel-parser)

Signed-off-by: dependabot[bot] <support@github.com>

* Revert changes from #8688

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
2020-07-15 14:58:58 +03:00
dependabot[bot]andfisker 35ac6f0752 Build(deps): Bump @babel/parser from 7.10.3 to 7.10.4 (#8688)
* Build(deps): Bump @babel/parser from 7.10.3 to 7.10.4

Bumps [@babel/parser](https://github.com/babel/babel/tree/HEAD/packages/babel-parser) from 7.10.3 to 7.10.4.
- [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.10.4/packages/babel-parser)

Signed-off-by: dependabot[bot] <support@github.com>

* Add `delete obj?.#x.a` test

* Add new `tuple` and `record` tests. Fix old test

* Fix test

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
2020-07-02 08:02:36 +08:00
dependabot[bot]andfisker 1802a6f6c4 Build(deps): Bump flow-parser from 0.127.0 to 0.128.0 (#8661)
* Build(deps): Bump flow-parser from 0.127.0 to 0.128.0

Bumps [flow-parser](https://github.com/facebook/flow) from 0.127.0 to 0.128.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.127.0...v0.128.0)

Signed-off-by: dependabot[bot] <support@github.com>

* Fix tests

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
2020-06-30 13:36:34 +03:00
fisker Cheung 3e44061f84 SCSS: Fix broken comments between declaration prop and value (#8366) 2020-06-09 18:41:16 +03:00
fisker Cheung 2b68f981fd Babel: support record and tuple syntax (#8453) 2020-06-03 09:35:13 +08:00
fisker Cheung 7d2e57c67f Babel: support moduleAttributes (#8436) 2020-06-02 20:31:33 +08:00
fisker Cheung e143e58545 JS: clean up babel plugins (#8435) 2020-05-29 09:26:52 +08:00
dependabot-preview[bot]andfisker c7ad0756b0 Bump @typescript-eslint/typescript-estree from 2.34.0 to 3.0.1 (#8413)
* Bump @typescript-eslint/typescript-estree from 2.34.0 to 3.0.1

Bumps [@typescript-eslint/typescript-estree](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-estree) from 2.34.0 to 3.0.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/typescript-estree/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v3.0.1/packages/typescript-estree)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Fix bigint print

* Add error tests on `dynamic-import`

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
2020-05-27 18:56:40 +09:00
fisker Cheung 555df90c55 Update yaml-unist-parser to v1.2.1 (#8386) 2020-05-25 18:28:49 +08:00
Sosuke Suzuki b94e41aae4 Vue: Support Vue DOM template formatting (#8326) 2020-05-18 21:22:30 +08:00
Georgii Dolzhykov 5dcadf43ab Fix babel-ts to emit a proper syntax error for (a:b) (#8046) 2020-05-16 02:48:45 +03:00
Sosuke Suzuki 531b7ca139 Vue: improve parsing custom blocks with angular-html-parser@1.5.0 (#8153)
* Parse twice for vue

* Remove 'html' from vueRootElementsSet

* Add link for Vue SFC spec

* Modify to don't format pug code

* Add changelog

* Fix typo

* Change lang, pug => unknown in tests

* Support top-level html

* Refactor shouldParseAsHTML

* Fix multiple template formatting

* Tiny fix

* Fix by Lint

* Remove console.log

* Support nested template tag

* Meke expected syntax errors

* Update tests

* Support unclosed node

* Update to angular-html-parser@1.7.0

* Update

* Remove failed tests

* Modify to throw first parsing error

* Remove options for error tests

* Optimize parse

* Fix reviewed points

* Fix by lint
2020-05-14 22:08:40 +08:00
dependabot-preview[bot]andfisker b5f39481aa Bump typescript from 3.8.3 to 3.9.2 (#8293)
* Bump typescript from 3.8.3 to 3.9.2

Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.8.3 to 3.9.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v3.8.3...v3.9.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Add Invalid JSX test

* More tests

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
2020-05-14 00:12:37 +03:00
fisker Cheung aa2c003aa2 Support HTML-like Comments(only in html) (#8173) 2020-05-08 21:37:59 +08:00
fisker Cheung 7ad515111e Categorize tests part 4(CSS, flow, misc) (#8251) 2020-05-08 01:29:34 +08:00