@peerigon/configs 4.0.0 → 4.1.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 +12 -0
- package/package.json +2 -7
- package/semantic-release/README.md +6 -6
- package/semantic-release/cross-publish.js +28 -9
- package/types/semantic-release/cross-publish.d.ts +6 -3
- package/types/semantic-release/cross-publish.d.ts.map +1 -1
- package/typescript/README.md +8 -3
- package/typescript/base.json +3 -3
- package/typescript/js-lib.json +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# [4.1.0](https://github.com/peerigon/configs/compare/v4.0.1...v4.1.0) (2025-03-10)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
- **semantic-release:** Add JSR as cross-publish registry ([bd5d42d](https://github.com/peerigon/configs/commit/bd5d42d5f9998b88db6709ddbb5f45a493831275))
|
|
6
|
+
|
|
7
|
+
## [4.0.1](https://github.com/peerigon/configs/compare/v4.0.0...v4.0.1) (2025-03-09)
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
- **typescript:** Incorrect dist path in base config ([4d06e5f](https://github.com/peerigon/configs/commit/4d06e5f116af9fba3751092c807e69a919220434))
|
|
12
|
+
|
|
1
13
|
# [4.0.0](https://github.com/peerigon/configs/compare/v3.2.0...v4.0.0) (2025-03-06)
|
|
2
14
|
|
|
3
15
|
### Features
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@peerigon/configs",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "Configs for ESLint, Prettier, TypeScript & friends",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -115,17 +115,12 @@
|
|
|
115
115
|
"prepare": "husky",
|
|
116
116
|
"release": "semantic-release"
|
|
117
117
|
},
|
|
118
|
-
"lint-staged": {
|
|
119
|
-
".github/workflows/*.{yml,yaml}": [
|
|
120
|
-
"pin-github-action --allow-empty"
|
|
121
|
-
],
|
|
122
|
-
"*.{js,jsx,ts,tsx,css,md,yml,yaml}": "prettier --write"
|
|
123
|
-
},
|
|
124
118
|
"dependencies": {
|
|
125
119
|
"@eslint-react/eslint-plugin": "^1.30.2",
|
|
126
120
|
"@eslint/compat": "^1.2.7",
|
|
127
121
|
"@eslint/js": "^9.21.0",
|
|
128
122
|
"@ianvs/prettier-plugin-sort-imports": "^4.4.1",
|
|
123
|
+
"@sebbo2002/semantic-release-jsr": "^2.0.4",
|
|
129
124
|
"@semantic-release/changelog": "^6.0.3",
|
|
130
125
|
"@semantic-release/exec": "^7.0.3",
|
|
131
126
|
"@semantic-release/git": "^10.0.1",
|
|
@@ -16,17 +16,17 @@ Then create a `.releaserc.json` next to your `package.json`:
|
|
|
16
16
|
|
|
17
17
|
Recommended configuration in your `package.json`:
|
|
18
18
|
|
|
19
|
-
```
|
|
19
|
+
```jsonc
|
|
20
20
|
{
|
|
21
21
|
"type": "module",
|
|
22
22
|
"scripts": {
|
|
23
|
-
"release": "semantic-release"
|
|
23
|
+
"release": "semantic-release",
|
|
24
24
|
},
|
|
25
25
|
"publishConfig": {
|
|
26
|
-
|
|
26
|
+
// Only if the package is supposed to be public
|
|
27
27
|
"access": "public",
|
|
28
|
-
"provenance": true
|
|
29
|
-
}
|
|
28
|
+
"provenance": true,
|
|
29
|
+
},
|
|
30
30
|
}
|
|
31
31
|
```
|
|
32
32
|
|
|
@@ -78,4 +78,4 @@ jobs:
|
|
|
78
78
|
We export the following `.releaserc.json` presets. They can be used by extending `@peerigon/configs/<preset-name>`:
|
|
79
79
|
|
|
80
80
|
- `semantic-release`: Recommended config for publishing a library to a single registry (according to your `.npmrc`).
|
|
81
|
-
- `semantic-release/cross-publish`: Config for publishing a library both to NPM _and_ Github
|
|
81
|
+
- `semantic-release/cross-publish`: Config for publishing a library both to NPM, JSR _and_ Github
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
import { config as baseConfig } from "./base.js";
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
/**
|
|
4
|
+
* @param {{ github: boolean; jsr: boolean }} options?
|
|
5
|
+
* @returns {import("semantic-release").Options}
|
|
6
|
+
*/
|
|
7
|
+
export const config = (
|
|
8
|
+
{ github = false, jsr = false } = { github: true, jsr: true },
|
|
9
|
+
) => {
|
|
10
|
+
/** @type {import("semantic-release").PluginSpec[]} */
|
|
11
|
+
const plugins = [];
|
|
12
|
+
|
|
13
|
+
if (baseConfig.plugins) {
|
|
14
|
+
plugins.push(...baseConfig.plugins);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
if (github) {
|
|
18
|
+
plugins.push([
|
|
9
19
|
"@semantic-release/exec",
|
|
10
20
|
{
|
|
11
21
|
verifyConditionsCmd:
|
|
@@ -15,8 +25,17 @@ export const config = {
|
|
|
15
25
|
successCmd: "rm /tmp/github.npmrc",
|
|
16
26
|
failCmd: "rm /tmp/github.npmrc",
|
|
17
27
|
},
|
|
18
|
-
]
|
|
19
|
-
|
|
28
|
+
]);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (jsr) {
|
|
32
|
+
plugins.push("@sebbo2002/semantic-release-jsr");
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return {
|
|
36
|
+
...baseConfig,
|
|
37
|
+
plugins,
|
|
38
|
+
};
|
|
20
39
|
};
|
|
21
40
|
|
|
22
|
-
export default config;
|
|
41
|
+
export default config();
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
export function config({ github, jsr }?: {
|
|
2
|
+
github: boolean;
|
|
3
|
+
jsr: boolean;
|
|
4
|
+
}): import("semantic-release").Options;
|
|
5
|
+
declare const _default: import("semantic-release").Options;
|
|
6
|
+
export default _default;
|
|
4
7
|
//# sourceMappingURL=cross-publish.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cross-publish.d.ts","sourceRoot":"","sources":["../../semantic-release/cross-publish.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cross-publish.d.ts","sourceRoot":"","sources":["../../semantic-release/cross-publish.js"],"names":[],"mappings":"AAMO,yCAHI;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,OAAO,CAAA;CAAE,GAC/B,OAAO,kBAAkB,EAAE,OAAO,CAkC9C"}
|
package/typescript/README.md
CHANGED
|
@@ -8,9 +8,14 @@ npm install typescript @peerigon/configs --save-dev
|
|
|
8
8
|
|
|
9
9
|
Then create a `tsconfig.json` just for type-checking next to your `package.json`:
|
|
10
10
|
|
|
11
|
-
```
|
|
11
|
+
```jsonc
|
|
12
12
|
{
|
|
13
|
-
"extends": "@peerigon/configs/typescript"
|
|
13
|
+
"extends": "@peerigon/configs/typescript",
|
|
14
|
+
"compilerOptions": {
|
|
15
|
+
// Our config sets only "lib": ["es2022"].
|
|
16
|
+
// Depending on your project, you might need to add DOM (and more).
|
|
17
|
+
"lib": ["es2022", "dom"],
|
|
18
|
+
},
|
|
14
19
|
}
|
|
15
20
|
```
|
|
16
21
|
|
|
@@ -32,7 +37,7 @@ In case you're developing a library with a dedicated build process, we recommend
|
|
|
32
37
|
{
|
|
33
38
|
"extends": ["./tsconfig.json", "@peerigon/configs/typescript/lib"],
|
|
34
39
|
"include": ["src"],
|
|
35
|
-
"exclude": ["src/**/*.test.ts", "src/tests
|
|
40
|
+
"exclude": ["src/**/*.test.ts", "src/**/*.test.tsx", "src/tests/**/*"]
|
|
36
41
|
}
|
|
37
42
|
```
|
|
38
43
|
|
package/typescript/base.json
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
"compilerOptions": {
|
|
5
5
|
// == Target and module settings ==
|
|
6
6
|
// Deliberately not using ESNext/NodeNext here to avoid breaking changes just by updating TypeScript.
|
|
7
|
-
"target": "
|
|
7
|
+
"target": "es2022",
|
|
8
8
|
"module": "Preserve",
|
|
9
9
|
"moduleDetection": "force",
|
|
10
|
-
"lib": ["
|
|
10
|
+
"lib": ["es2022"],
|
|
11
11
|
|
|
12
12
|
// == Strictness settings ==
|
|
13
13
|
"strict": true,
|
|
@@ -39,6 +39,6 @@
|
|
|
39
39
|
"skipLibCheck": false,
|
|
40
40
|
"verbatimModuleSyntax": true
|
|
41
41
|
},
|
|
42
|
-
"exclude": ["dist"],
|
|
42
|
+
"exclude": ["${configDir}/dist"],
|
|
43
43
|
"$schema": "https://json.schemastore.org/tsconfig"
|
|
44
44
|
}
|