@peerigon/configs 4.0.1 → 4.2.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 CHANGED
@@ -1,3 +1,17 @@
1
+ # [4.2.0](https://github.com/peerigon/configs/compare/v4.1.0...v4.2.0) (2025-03-10)
2
+
3
+ ### Features
4
+
5
+ - **eslint:** bump @eslint-react/eslint-plugin from 1.30.2 to 1.31.0 ([#30](https://github.com/peerigon/configs/issues/30)) ([1008a87](https://github.com/peerigon/configs/commit/1008a87a8c3e343c07f742aeb357dabcdaf38709))
6
+ - **prettier:** bump eslint-config-prettier from 10.0.2 to 10.1.1 ([#27](https://github.com/peerigon/configs/issues/27)) ([c27fc02](https://github.com/peerigon/configs/commit/c27fc027df9dcfd7cdbf580878a5f42ce9bda93a))
7
+ - **react:** bump eslint-plugin-react-compiler from 19.0.0-beta-e552027-20250112 to 19.0.0-beta-714736e-20250131 ([#29](https://github.com/peerigon/configs/issues/29)) ([042a398](https://github.com/peerigon/configs/commit/042a398e77de01d6506247454699c12508b78882))
8
+
9
+ # [4.1.0](https://github.com/peerigon/configs/compare/v4.0.1...v4.1.0) (2025-03-10)
10
+
11
+ ### Features
12
+
13
+ - **semantic-release:** Add JSR as cross-publish registry ([bd5d42d](https://github.com/peerigon/configs/commit/bd5d42d5f9998b88db6709ddbb5f45a493831275))
14
+
1
15
  ## [4.0.1](https://github.com/peerigon/configs/compare/v4.0.0...v4.0.1) (2025-03-09)
2
16
 
3
17
  ### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peerigon/configs",
3
- "version": "4.0.1",
3
+ "version": "4.2.0",
4
4
  "description": "Configs for ESLint, Prettier, TypeScript & friends",
5
5
  "keywords": [
6
6
  "eslint",
@@ -120,6 +120,7 @@
120
120
  "@eslint/compat": "^1.2.7",
121
121
  "@eslint/js": "^9.21.0",
122
122
  "@ianvs/prettier-plugin-sort-imports": "^4.4.1",
123
+ "@sebbo2002/semantic-release-jsr": "^2.0.4",
123
124
  "@semantic-release/changelog": "^6.0.3",
124
125
  "@semantic-release/exec": "^7.0.3",
125
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
- ```json
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
- "//": "only if the package is supposed to be public",
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
- /** @type {import("semantic-release").Options} */
4
- export const config = {
5
- ...baseConfig,
6
- plugins: [
7
- ...(baseConfig.plugins ?? []),
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
- /** @type {import("semantic-release").Options} */
2
- export const config: import("semantic-release").Options;
3
- export default config;
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":"AAEA,iDAAiD;AACjD,qBADW,OAAO,kBAAkB,EAAE,OAAO,CAiB3C"}
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"}
@@ -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
- ```json
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/**/*.ts"]
40
+ "exclude": ["src/**/*.test.ts", "src/**/*.test.tsx", "src/tests/**/*"]
36
41
  }
37
42
  ```
38
43
 
@@ -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": "ES2022",
7
+ "target": "es2022",
8
8
  "module": "Preserve",
9
9
  "moduleDetection": "force",
10
- "lib": ["ES2022"],
10
+ "lib": ["es2022"],
11
11
 
12
12
  // == Strictness settings ==
13
13
  "strict": true,
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "extends": "./lib.json",
3
3
  "compilerOptions": {
4
- "allowJs": true,
5
4
  "emitDeclarationOnly": true,
6
5
  "outDir": "${configDir}/types"
7
6
  },