Commit Graph
69 Commits
Author SHA1 Message Date
fisker Cheung 27700e5282 Add test to close issue 9102 (#9982) 2020-12-31 21:24:24 +09:00
fisker Cheung be497c3c8f Use printBlock to print ClassBody (#9915) 2020-12-21 17:10:03 +08: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
fisker Cheung 902d524d2f Treat .prettierrc as yaml (#8105) 2020-11-30 12:23:20 +08: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 50eeaadeca MDX: fix JSX format (#9267) 2020-09-27 08:46:19 +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
fisker Cheung 203be9da5a Change test package name (#8848) 2020-09-18 14:05:29 +08:00
fisker Cheung 94ef5f5683 Test: Fix indexes calculation (#9152)
* Test: Fix indexes calculation

* Simplify logic

* Update snapshots
2020-09-17 07:31:29 +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 CheungandGeorgii Dolzhykov f5e96f7d83 Redirect babel parser to babel-flow (#9071)
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-09-01 11:23:47 +08:00
fisker Cheung 589ebf670b Add pure css parser (#7933) 2020-08-28 13:07:49 +08:00
fisker Cheung f2e3cb7f3b Support .wxs & .wxss (#9081)
* Support `.wxs` &  `.wxss`

* Spell check

* Add comments

* Spellcheck
2020-08-27 20:56:53 +03:00
Sosuke SuzukiandChristopher J. Brody 751f67af1f Upgrade to TypeScript 4.0 (#8982)
* Upgrade to TypeScript 4.0

* Update tests

* Fix changelog

* Revert invalid label tests

* Set loggerFn to false

* Use TS 4.0

* Apply logical assginment test for TypeScript

* Remove hack for NamedTupleMember

* workaround for TypeScript 4.0 in src/language-js/utils.js

Co-authored-by: Christopher J. Brody <chris.brody+brodybits@gmail.com>
2020-08-21 16:09:28 +09:00
fisker Cheung 1d2ff824cc Improve requirePragma on files with BOM (#9003) 2020-08-21 10:30:42 +08:00
fisker Cheung d31ebf4619 Test: Improve coverage (#8811) 2020-08-21 09:43:24 +08:00
fisker Cheung 7bf1803a11 JS: DRY hasPragma & insertPragma (#9002) 2020-08-21 09:10:14 +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
fisker Cheung 967bc6f502 Support babel TSNamedTupleMember (#8885) 2020-08-04 12:17:53 +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 d725261fc5 MDX: fix unstable format when embedded off (#8825) 2020-07-25 02:06:22 +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
fisker Cheung 12d379d29d Test: visualize the range (#8420) 2020-05-28 01:16: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
fisker Cheung f2c1d70918 JS: pragma support files with shebang (#8376) 2020-05-23 19:28:05 +08:00
fisker Cheung 243a06f073 Test: correct file extensions (#8362) 2020-05-21 21:10:00 +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