Commit Graph
100 Commits
Author SHA1 Message Date
fisker Cheung f470142e16 test: Allow assert output (#8142)
* test: Allow assert output

* Use `outdent`
2020-04-25 09:23:34 +08:00
fisker Cheung a14ba46a81 Add test for issue 8147 (#8148) 2020-04-24 23:18:40 +03:00
fisker Cheung ea2169a97f Build: Fix cache logic (#8128) 2020-04-24 11:00:06 +08:00
fisker Cheung f68114ebf8 website: Use selected text as range (#8089) 2020-04-24 10:38:39 +08:00
fisker Cheung 1c93dcefca Test comments in empty js file (#8115) 2020-04-23 20:36:58 +03:00
fisker Cheung ab1ea713d6 Missing files on lint (#8127) 2020-04-23 19:33:40 +08:00
fisker Cheung 305fea8a59 Codebase install test (#6373) 2020-04-23 10:37:09 +08:00
fisker Cheung 2f6ef511c5 Bump angular-html-parser to v1.5.0 (#8107) 2020-04-21 17:09:39 +03:00
fisker Cheung 6ad8a7fef3 Use resolve if require.resolve is overridden (#8072)
# Conflicts:
#	package.json
2020-04-21 17:02:48 +03:00
fisker Cheung 09d24debf0 Test json parse errors (#8103) 2020-04-21 14:38:30 +03:00
fisker Cheung d2f51d7494 Fix ignore bug on windows (#8098)
* Fix file ignore bug on windows

* Use `ignore.ignores`

* Fix -stdin-filepath

* Add changelog
2020-04-21 14:33:20 +03:00
fisker CheungandGeorgii Dolzhykov 3a373074bc Run tests on snippets instead of files (#8088)
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-04-21 15:57:58 +08:00
fisker Cheung cfb28d632c Use resolve if require.resolve is overridden (#8072) 2020-04-21 10:09:26 +03:00
fisker Cheung eaca5dbe26 Correct standalone test environment variable (#8080) 2020-04-20 00:58:04 +03:00
fisker Cheung fc5f5462ea Simplify production tests (#8075) 2020-04-20 00:57:53 +03:00
fisker Cheung 71fbd6149a Refactor production tests (#8073)
# Conflicts:
#	scripts/test-dist.js
2020-04-20 00:57:31 +03:00
fisker Cheung 0f3967b5ab Correct standalone test environment variable (#8080) 2020-04-19 02:29:12 +08:00
fisker Cheung be56c725c0 Show options in test title (#7785)
* Show options in test title

* Update snapshots
2020-04-18 16:09:07 +03:00
fisker Cheung be094b8886 Simplify production tests (#8075) 2020-04-18 02:17:04 +08:00
fisker Cheung 118b79f0c9 Refactor production tests (#8073) 2020-04-18 01:24:22 +08:00
fisker Cheung e0669a075e Fix master ref (#8062) 2020-04-15 22:41:01 +08:00
fisker Cheung bc1d79ca66 Cache CI build result (#8027) 2020-04-15 22:03:22 +08:00
fisker Cheung a522b1e556 Add ability to test errors (#8025) 2020-04-14 18:19:13 +08:00
fisker Cheung f4bdd83733 Use jest@24 to collect coverage (#8026) 2020-04-12 10:29:27 +08:00
fisker CheungandGeorgii Dolzhykov 2a9f65104d Enable GitHub Actions for a patch-release branch (#8024)
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-04-12 00:39:54 +03:00
fisker Cheung e1a6a7a6a1 Fix less :extend format (#7984) 2020-04-11 22:08:56 +03:00
fisker CheungandGeorgii Dolzhykov 5d9963431f Enable GitHub Actions for a patch-release branch (#8024)
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-04-12 02:58:39 +08:00
fisker CheungandGeorgii Dolzhykov f475a5bd43 Update spellcheck config and scripts (#8012)
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-04-12 01:19:00 +08:00
fisker b77e73a3c5 Revert workflow changes 2020-04-11 21:14:46 +08:00
fisker 6daa7e199e Quote branch names 2020-04-11 21:02:27 +08:00
fisker Cheung aeeb2ff7a8 Throw original error when loading external config (#7973) 2020-04-10 21:27:50 +08:00
fisker Cheung f0207e6850 Enable unicorn/better-regex (#7991)
* Enable `unicorn/better-regex`

* Spellcheck ignore regex
2020-04-10 21:20:40 +08:00
fisker Cheung eca28c70c6 Fix graphql comments between interfaces (#8006) 2020-04-10 21:09:54 +08:00
fisker Cheung cf6f251b3c graphql: Allow interfaces to implement other interfaces (#8007)
* `graphql`: Allow interfaces to implement other interfaces

* Add changelog
2020-04-10 20:27:25 +08:00
fisker Cheung 7e8b6b7617 Skip DEEP_COMPARE test if code didn't change (#7982)
* Skip `DEEP_COMPARE` if code didn't change

* Check stable
2020-04-10 20:07:07 +08:00
fisker CheungandGeorgii Dolzhykov aa3141c24e Wrap tests in describe (#7934)
* Run `format()` in test function

* Wrap `test`s in `describe`

* Update tests_config/run_spec.js

Co-Authored-By: Georgii Dolzhykov <thorn.mailbox@gmail.com>

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-04-10 19:12:01 +08:00
fisker Cheung 939a660850 Adjust maxWorkers for jest (#7989) 2020-04-09 14:33:37 +08:00
fisker Cheung 69d121b19e Enable unicorn/prefer-set-has (#7990) 2020-04-09 13:22:28 +08:00
fisker Cheung 76cb1efcb6 Fix less :extend format (#7984)
* Fix less `:extend` format

* Add changelog

* Add longer test

* Add issue link

* Style

* Fix changelog
2020-04-08 18:02:13 +03:00
fisker Cheung 0c1b737cde Skip AST_COMPARE test if code didn't change (#7800)
* Skip `AST_COMPARE` test if code didn't change

* use basename

* Use `test.skip`

* Code style
2020-04-07 14:38:25 +03:00
fisker Cheung 096c28f080 Fix docs code style (#7937) 2020-04-03 18:44:03 +08:00
fisker Cheung 17377f3082 Split css parsers (#7932)
* Split css parsers

* pass function to parseWithParser

* Fix plugins parser

* Fix coverage fails

* coverage ignore

* Update project coverage target to 95%
2020-04-03 12:41:48 +08:00
fisker Cheung bcf99ade8d Fix angular unstable expression binding (#7924) 2020-04-02 20:20:28 +03:00
fisker Cheung 93aa37867e Update isSCSS test regex (#7922) 2020-04-02 15:51:48 +03:00
fisker Cheung 22e3004719 Fix empty file format (#7921) 2020-04-02 00:43:52 +03:00
fisker Cheung e199e68bff Format script content inside HTML tag with colon (#7916)
* Format script content inside HTML tag with colon

* Fix mistake
2020-04-01 20:35:58 +03:00
fisker Cheung 257c9da18a Try upload coverage with token (#7930) 2020-04-01 18:32:39 +03:00
fisker Cheung b0ffc0f1df Fix prettier-ignore inside JSX (#7877) 2020-03-26 20:10:05 +02:00
fisker Cheung 412694e1c5 Tweak test and CI configs (#7866)
* Set `jest` verbose to false by default

* Correct `doc-debug.js` path

* Remove outdated ignore patterns

* Exclude Node.js 13 on macos
2020-03-26 17:02:43 +02:00
fisker Cheung 77e3fc0d41 Fix ignored element print (#7867)
* Fix ignored element print

* Add changelog
2020-03-25 15:54:39 +03:00
fisker Cheung b9b5a66f40 Tweak CI configs (#7860)
* Only run on `master` push

* Test `CRLF` on windows
2020-03-24 17:09:16 +02:00
fisker CheungandGeorgii Dolzhykov 34115cbd3c Remove azure pipelines (#7824)
* Followup work on setup github actions

* Coverage report & split `prod_lint`

* Add env

* Remove coverage report on azure pipelines

* Remove build step on lint

* remove coverage report on prod_test

* Use `ci-info` instead of `is-ci`

* Always enable `ENABLE_TEST_RESULTS` and `AST_COMPARE` on CI

* Standalone test and remove some env

* coverage report

* reduce matrix

* standalone test

* `ci-info`

* Remove token

* Disable `coverage` on azure pipelines

* use master version of codecov-action

* Link to master status

* fix prod lint

* Use boolean env

* Remove locv report

* Try lcov report

* pin `codecov-action` version, enable `verbose`

* azure coverage

* Name

* Trigger CI

* Use `basename`

* Trigger CI

* Try `runInBand`

* try `maxWorkers`

* Remove azure pipelines

* clean up

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-03-23 11:56:02 +02:00
fisker CheungandGeorgii Dolzhykov 54f907dba3 Followup work on setup github actions (#7431)
* Followup work on setup github actions

* Coverage report & split `prod_lint`

* Add env

* Remove coverage report on azure pipelines

* Remove build step on lint

* remove coverage report on prod_test

* Use `ci-info` instead of `is-ci`

* Always enable `ENABLE_TEST_RESULTS` and `AST_COMPARE` on CI

* Standalone test and remove some env

* coverage report

* reduce matrix

* standalone test

* `ci-info`

* Remove token

* Disable `coverage` on azure pipelines

* use master version of codecov-action

* Link to master status

* fix prod lint

* Use boolean env

* Remove locv report

* Try lcov report

* pin `codecov-action` version, enable `verbose`

* azure coverage

* Name

* Trigger CI

* Use `basename`

* Trigger CI

* Try `runInBand`

* try `maxWorkers`

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-03-23 03:36:44 +02:00
fisker Cheung 71b2d35d59 Test second format (#7565) 2020-03-21 13:43:01 +02:00
fisker Cheung c82ce657e3 Run verify test on disabled babel-ts tests (#7786) 2020-03-18 15:35:13 +02:00
fisker Cheung aacb5fa75f Fix vue attributes indention (#7781) 2020-03-17 22:30:24 +02:00
fisker Cheung 853901e78d Update yaml to v1.8.2 (#7753) 2020-03-17 01:36:12 +02:00
fisker Cheung ecacb3bab4 Update rollup to v2 (#7749) 2020-03-11 17:12:43 +03:00
fisker Cheung acff41e7c9 Update postcss-less to v3 (#6981) 2020-03-10 01:14:34 +02:00
fisker Cheung 31c5798e59 Memoize loadPlugins (#7485) 2020-02-27 16:43:02 +02:00
fisker Cheung 129fcb6005 Remove resolve package (#7508) 2020-02-25 03:03:58 +02:00
fisker Cheung 04012b9dc7 Remove --flow-parser/useFlowParser (#7511) 2020-02-24 19:30:12 +02:00
fisker Cheung 6515a7ebe9 Remove deprecated options (#7536) 2020-02-24 18:58:32 +02:00
fisker Cheung fc8218b5a6 Remove postcss parser (#7535) 2020-02-24 18:58:16 +02:00
fisker Cheung b3f0102a87 Remove babylon parser (#7533)
* Remove `babylon`

* Add changelog

* Fix website files
2020-02-24 18:19:03 +02:00
fisker Cheung 647c041b57 Check pattern existence before glob (#7587) 2020-02-19 12:57:39 +02:00
fisker CheungandChristopher J. Brody 3cef19c73e Update globby to v11 (#6776)
* globby@10 update (with fast-glob implementation)

with some minor test snapshot updates in tests_integration since
fast-glob does not always keep the same file order as node-glob

* with no `nodir: true` option

use of no `nodir: true` option was introduced in 639c52388
but it does not seem to be needed with some newer
versions of globby

* with workaround for fast-glob on Windows

ref: https://github.com/mrmlnc/fast-glob#how-to-write-patterns-on-windows

Co-authored-by: fisker Cheung <lionkay@gmail.com>
Co-authored-by: Christopher J. Brody <chris@brody.consulting>

* Revert "with no `nodir: true` option"

This reverts commit f7297cbceebc3d939bca0d90a904a1d3fea45345.

* revert updates to snapshots in tests_integration

* sort the file paths from globby

and update some snapshots in tests_integration

* Update build scripts

* replace `util.promisify` with `pify`

* style

* typo

* add pify to dict

* check index.js

* debug

* exclude `transform-async-to-generator`

* fix `bin-prettier.js`

* restore disabled script

* try depth:1

* remove depth add `./`

* sort dir

* disable expandDirectories

ref: https://github.com/sindresorhus/globby/blob/master/index.js#L95

* use absolute path

* remove sort()

* sort dir

* use `alphasorti` compare

* remove './'

* fix `findPluginsInNodeModules`

* fix `findPluginsInNodeModules`

* restore snap

* fix `findPluginsInNodeModules`

* return early

* code style

* sort

* update snap

* try mem

* mem `loadPlugins` function

* fix

* glob directories instead of package.json

* use deep

* remove mem

* improve speed

* support dot pattern

* expand directories test

* restore import order

* remove snap

* update test

* restore `findPluginsInNodeModules`

* Update `globby`

* `fast-glob` beta

* Restore logic

* Add tests for `globby` update

* Fix tests

* Remove option with default value

* Try new beta version of `fast-glob`

* Restore error info

* Add `path.sep` check
2020-02-18 17:36:22 +02:00
fisker Cheung bf6ceadb8b Add a test with same packageName and fileName (#7517) 2020-02-18 16:36:17 +02:00
fisker Cheung 1c0e9ae20b Update @angular/compiler to v9 (#7596) 2020-02-18 00:39:26 +02:00
fisker Cheung ee61bdf435 Remove usage of cosmiconfig v4 interface (#7458)
* Remove usage of cosmiconfig v4 interface

* Remove `loadEditorConfig` second argument
2020-02-17 16:42:04 +02:00
fisker Cheung 2bfaa7c2cf Simplify createLanguage (#7509) 2020-02-17 16:39:08 +02:00
fisker Cheung d2de524571 Don't add parens to undefined in ConditionalExpression with jsx (#7504)
* Add failed test

* Don't add parens to Literal and Identifier

* Update snap shot

* Move test to `jsx`

* Only undefined

* Add changelog
2020-02-17 16:34:50 +02:00
fisker CheungandGeorgii Dolzhykov 40a1418246 Format value of HTML class attribute (#7555)
* Format HTML attribute `class` value

* Add more example

* Typo

* Don't break

* exclude mustache and multiparser

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-02-16 10:59:15 +02:00
fisker Cheung 017d079ca8 Format value of HTML style attribute (#7556) 2020-02-14 14:21:11 +03:00
fisker Cheung ee1a8e45f4 Always enable ENABLE_TEST_RESULTS and AST_COMPARE on CI (#7433)
* Use `ci-info` instead of `is-ci`

* Always enable `ENABLE_TEST_RESULTS` and `AST_COMPARE` on CI
2020-02-14 12:30:58 +02:00
fisker Cheung 4bac066146 Refactor shouldPrintComma logic for angular (#7507) 2020-02-14 13:21:46 +03:00
fisker Cheung b26d66feb3 Remove unnecessary type-casting in FastPath (#7506) 2020-02-14 13:21:19 +03:00
fisker Cheung 03655b48e9 Categorize scripts in package.json (#7561) 2020-02-14 13:20:38 +03:00
fisker Cheung 61398f0dc7 Vue: don't print long single expression of TemplateLiteral and StringLiteral on new line (#7479)
* Add failed test

* Fix logic

* Update example

* More tests

* Add changelog_unreleased/vue/pr-7479.md

* Fix logic
2020-02-14 01:47:36 +02:00
fisker Cheung 5cb59a07d1 Add tests for globby update (#7543) 2020-02-14 01:39:01 +02:00
fisker Cheung 8fdab1bf40 A little DRY on TypeCastExpression print (#7551) 2020-02-14 01:35:43 +02:00
fisker Cheung 81e8f28156 Fix warning on test (#7566) 2020-02-14 00:14:24 +02:00
fisker CheungandGeorgii Dolzhykov b35074007b HTML: Fix inconsistent formatting of self-closing tags (#7395)
* Fix inconsistent self-closing tag in vue

* Update snap

* Add changelog

* More test

* reword changelog

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-02-10 13:36:25 +03:00
fisker Cheung 9d9f39cb7c Add missing comma in technical-details.md (#7549) 2020-02-06 15:25:02 +03:00
fisker Cheung e2e534df30 Remove normalize-path package (#7465)
* Remove `normalize-path` module

* Try run all tests on `standalone`

* Restore test

* Add `no-parser-tests`

* Fix issue with shim

* DRY

* Rename tests

* Use `endsWith`
2020-02-03 01:33:19 +02:00
fisker Cheung 6e397b2bb2 Fix a failed test on flow parser (#7501)
* Add failed tests

* fix ast diff

* Delete dead code
2020-02-01 18:27:31 +02:00
fisker Cheung 0aec777e68 Use "lodash/groupBy" (#7438) 2020-02-01 18:26:59 +02:00
fisker Cheung bd2166b798 Rewrite FastPath class (#7442) 2020-01-31 23:08:58 +09:00
fisker Cheung 9049c166b4 Run prettier on more supported files (#7456) 2020-01-31 13:40:30 +02:00
fisker Cheung 340951f045 Keep parentheses of SequenceExpression for ExportDefaultDeclaration (#7491)
* Fix export default `SequenceExpression`

* Add more parser

* Add change log

* Fix  logic

* Rename that function

* Add a branch
2020-01-31 13:28:08 +03:00
fisker Cheung a1ce84a13b Cleanup dead code from pr7461 (#7468)
* Add test for #5810

* Remove maybe dead code

* Add changelog

* Remove old tests

* More dead code
2020-01-31 13:23:10 +03:00
fisker Cheung 0370f47cb3 Refactor some Object.assign (#7437) 2020-01-31 09:13:37 +09:00
fisker Cheung 947a174954 Flow: Add support for decorators (#7482)
* Update flow parse options

* Add `decorators` test

* Restore enums

* Add changelog

* Add babel-verify
2020-01-31 08:55:30 +09:00
fisker Cheunganddependabot-preview[bot] 28e70b6c9b Bump linguist-languages from 7.7.0 to 7.8.0 (#7481)
* Bump linguist-languages from 7.7.0 to 7.8.0

Bumps [linguist-languages](https://github.com/ikatyang/linguist-languages) from 7.7.0 to 7.8.0.
- [Release notes](https://github.com/ikatyang/linguist-languages/releases)
- [Commits](https://github.com/ikatyang/linguist-languages/compare/v7.7.0...v7.8.0)

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

* Bump linguist-languages from 7.7.0 to 7.8.0

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-01-30 19:36:49 +02:00
fisker Cheung eb1e587d2f Flow: Add support for ClassPrivateProperty (#7484)
* Support `ClassPrivateProperty`

* Add changelog

* Code style

* Fix babel

* Move logic up

* Add tests

* Make test a little bit uglier
2020-01-31 01:51:27 +09:00
fisker Cheung 90128a3a00 Flow: add typing support for the symbol type (#7472)
* Flow: add typing support for the `symbol` type

* Add changelog
2020-01-30 13:08:01 +03:00
fisker Cheung 0c93198942 Remove deprecated parser & update sharedUtil (#6993)
* Remove some old stuff

* Add changelog

* Fix test

* util changes

* restore parser

* Fix `util` usage
2020-01-29 17:32:42 +03:00
fisker Cheung 2877dda67e Use ci-info instead of is-ci (#7432) 2020-01-29 15:42:07 +02:00
fisker Cheung d2f54564fa Update cdn files version (#7457) 2020-01-29 15:38:50 +02:00
fisker Cheung ebd0c6d605 Remove useless argument in editorconfig load function (#7459) 2020-01-29 12:51:05 +03:00