-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: upgrade dependencies & transfer to Vitest (#17)
* refactor: update directory setup to the current Hilla setup * refactor: setup Vitest as test runner * refactor: configure Vitest to run in Chrome * chore: adjust Github Actions workflow * chore: add manual triggering for the workflow * chore: add generic registration * chore: fix Eslint issues * chore: use registrations in tests too * chore: improve structure * chore: fix path
- Loading branch information
Showing
47 changed files
with
12,952 additions
and
18,019 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# http://editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.{java,xml}] | ||
indent_size = 4 | ||
|
||
[*.md] | ||
insert_final_newline = false | ||
trim_trailing_whitespace = false | ||
|
||
[*.kt] | ||
indent_size = 4 | ||
|
||
[*.gradle] | ||
indent_size = 4 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import micromatch from 'micromatch'; | ||
|
||
const excludePatterns = ['**/node_modules/**/*', '**/*.snap.{ts,js}']; | ||
|
||
function createExcludeCallback(command) { | ||
return (files) => { | ||
const matched = micromatch.not(files, excludePatterns); | ||
|
||
return matched.length > 0 ? [`${command} ${matched.map((filename) => `"${filename}"`).join(' ')}`] : []; | ||
}; | ||
} | ||
|
||
export const extensions = ['ts', 'js', 'tsx'].join(','); | ||
export const commands = [createExcludeCallback('eslint --fix'), createExcludeCallback('prettier --write')]; | ||
|
||
export default { | ||
[`./*.{${extensions}}`]: commands, | ||
}; |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"pre-commit": "npx lint-staged" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,31 @@ | ||
# flow-hilla-common | ||
# Flow & Hilla Common Utilities | ||
|
||
![Frontend CI](https://github.com/vaadin/hilla/actions/workflows/frontend.yml/badge.svg) | ||
[![codecov](https://codecov.io/gh/vaadin/hilla/branch/main/graph/badge.svg?token=PQMTMS8ECC)](https://codecov.io/gh/vaadin/hilla) | ||
|
||
The collection of common utilities used by Vaadin Flow and Hilla. | ||
|
||
| Package | Status | | ||
|-------------------------|--------| | ||
| [@vaadin/common-frontend](packages/ts/common-frontend) | [![Latest Stable Version](https://img.shields.io/npm/v/@vaadin/common-frontend.svg)](https://www.npmjs.com/package/@vaadin/common-frontend) | | ||
|
||
## Contribution | ||
|
||
You can download the project and run tests using the following commands: | ||
```bash | ||
$ git clone https://github.com/vaadin/flow-hilla-common.git | ||
$ cd flow-hilla-common | ||
$ npm install | ||
$ npm run build | ||
$ npm test | ||
``` | ||
|
||
## Requirements | ||
|
||
To work with this project as a developer, you need the following versions of `node` and `npm`: | ||
|
||
- **NodeJS**: `^12.20.0 || ^14.13.1 || >=16.0.0` (native support for ES Modules), | ||
- **npm**: `^7` (`package-lock.json` is of version 2; also, `lerna` is unable to bootstrap this project correctly with lower `npm`) | ||
|
||
|
||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.