@amedia/jest-config 1.0.3 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +60 -0
- package/{index.cjs → index.js} +3 -3
- package/package.json +8 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,65 @@
|
|
|
1
1
|
# @amedia/jest-config
|
|
2
2
|
|
|
3
|
+
## 2.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- d6346cc: Kragl 4.x
|
|
8
|
+
|
|
9
|
+
_Get ready: This release breaks the world._
|
|
10
|
+
|
|
11
|
+
ESLint 9 introduces a new configuration format (flat config files)[^1]
|
|
12
|
+
so as we move to ESLint 9 we need to re-do all the ESLint configuration
|
|
13
|
+
both in this package, and in downstream repos.
|
|
14
|
+
|
|
15
|
+
See the configuration docs for how to setup kragl for your project.
|
|
16
|
+
|
|
17
|
+
[^1]: https://eslint.org/docs/latest/use/configure/configuration-files
|
|
18
|
+
|
|
19
|
+
We are all-in on ECMAScript Modules at Amedia, but have been held back
|
|
20
|
+
in this repo due to the tools we depend on have lagged behind. Now the
|
|
21
|
+
world is ready, and we are making the move.
|
|
22
|
+
|
|
23
|
+
Changes that hit the consumer are things like `.prettierrc.cjs` will not
|
|
24
|
+
work with the `@amedia/prettier-config` package and the consumer needs
|
|
25
|
+
to move to `prettier.config.js` with ESM syntax.
|
|
26
|
+
|
|
27
|
+
`@amedia/eslint-config` exports an helper function that generates an
|
|
28
|
+
ESLint configuration that complies with our standards, it supports both
|
|
29
|
+
toggling options and full-on custom configuration.
|
|
30
|
+
|
|
31
|
+
For example, a TypeScript + Svelte project:
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
import eslintConfig from '@amedia/eslint-config';
|
|
35
|
+
|
|
36
|
+
export default eslintConfig({
|
|
37
|
+
typescript: true,
|
|
38
|
+
svelte: true,
|
|
39
|
+
});
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
We have had a long-standing issue of the LSP hanging when interacting
|
|
43
|
+
with our Prettier configuration. This was likely due to our Prettier
|
|
44
|
+
configuration dynamically loading the Svelte plugin if it was necessary.
|
|
45
|
+
Some versions of Prettier struggle with that, so for kragl 4.x the
|
|
46
|
+
consumer manually decides if the standard or svelte prettier
|
|
47
|
+
configuration should be used.
|
|
48
|
+
|
|
49
|
+
Standard:
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
// prettier.config.js
|
|
53
|
+
export { default } from '@amedia/prettier-config';
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Svelte:
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
// prettier.config.js
|
|
60
|
+
export { svelte as default } from '@amedia/prettier-config';
|
|
61
|
+
```
|
|
62
|
+
|
|
3
63
|
## 1.0.3
|
|
4
64
|
|
|
5
65
|
### Patch Changes
|
package/{index.cjs → index.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { join } from 'node:path';
|
|
2
|
+
import { cwd } from 'node:process';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
export default {
|
|
5
5
|
rootDir: join(cwd()),
|
|
6
6
|
cache: false,
|
|
7
7
|
collectCoverage: true,
|
package/package.json
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amedia/jest-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Jest config for Amedia",
|
|
5
|
-
"type": "
|
|
6
|
-
"
|
|
5
|
+
"type": "module",
|
|
6
|
+
"module": "./index.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"import": "./index.js"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
7
12
|
"author": "",
|
|
8
13
|
"license": "ISC",
|
|
9
|
-
"devDependencies": {
|
|
10
|
-
"jest": "28.1.3"
|
|
11
|
-
},
|
|
12
|
-
"peerDependencies": {
|
|
13
|
-
"jest": "28.x"
|
|
14
|
-
},
|
|
15
14
|
"publishConfig": {
|
|
16
15
|
"access": "public"
|
|
17
16
|
}
|