@vidavidorra/create-project 4.3.0 → 4.4.1
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/.github/workflows/ci-cd.yml +6 -6
- package/dist/content/eslint-config.js +1 -1
- package/dist/content/files.js +2 -1
- package/dist/content/lint-staged.js +1 -1
- package/dist/content/renovate.d.ts +20 -0
- package/dist/content/renovate.js +24 -0
- package/dist/content/ts-config.d.ts +4 -4
- package/dist/content/ts-config.js +6 -6
- package/package.json +2 -2
|
@@ -13,21 +13,21 @@ permissions:
|
|
|
13
13
|
pull-requests: write
|
|
14
14
|
jobs:
|
|
15
15
|
lint-commit-messages:
|
|
16
|
-
uses: vidavidorra/.github/.github/workflows/lint-commit-messages.yml@
|
|
16
|
+
uses: vidavidorra/.github/.github/workflows/lint-commit-messages.yml@dc700f4dbdcf0b04364f6741a57ee392a8a387fb # v8.0.9
|
|
17
17
|
lint:
|
|
18
|
-
uses: vidavidorra/.github/.github/workflows/node-lint.yml@
|
|
18
|
+
uses: vidavidorra/.github/.github/workflows/node-lint.yml@dc700f4dbdcf0b04364f6741a57ee392a8a387fb # v8.0.9
|
|
19
19
|
build:
|
|
20
|
-
uses: vidavidorra/.github/.github/workflows/node-build.yml@
|
|
20
|
+
uses: vidavidorra/.github/.github/workflows/node-build.yml@dc700f4dbdcf0b04364f6741a57ee392a8a387fb # v8.0.9
|
|
21
21
|
test:
|
|
22
|
-
uses: vidavidorra/.github/.github/workflows/node-test.yml@
|
|
22
|
+
uses: vidavidorra/.github/.github/workflows/node-test.yml@dc700f4dbdcf0b04364f6741a57ee392a8a387fb # v8.0.9
|
|
23
23
|
code-coverage:
|
|
24
|
-
uses: vidavidorra/.github/.github/workflows/node-test-coverage.yml@
|
|
24
|
+
uses: vidavidorra/.github/.github/workflows/node-test-coverage.yml@dc700f4dbdcf0b04364f6741a57ee392a8a387fb # v8.0.9
|
|
25
25
|
needs:
|
|
26
26
|
- lint
|
|
27
27
|
- build
|
|
28
28
|
- test
|
|
29
29
|
release:
|
|
30
|
-
uses: vidavidorra/.github/.github/workflows/release.yml@
|
|
30
|
+
uses: vidavidorra/.github/.github/workflows/release.yml@dc700f4dbdcf0b04364f6741a57ee392a8a387fb # v8.0.9
|
|
31
31
|
needs:
|
|
32
32
|
- lint-commit-messages
|
|
33
33
|
- lint
|
|
@@ -2,7 +2,7 @@ import ts from 'typescript';
|
|
|
2
2
|
import { File } from './file.js';
|
|
3
3
|
class EslintConfig extends File {
|
|
4
4
|
constructor(path, options) {
|
|
5
|
-
super(path, { ...options, format: true });
|
|
5
|
+
super(path, { ...options, format: true, read: false });
|
|
6
6
|
}
|
|
7
7
|
process() {
|
|
8
8
|
this._content = ts.createPrinter().printFile(this.sourceFile());
|
package/dist/content/files.js
CHANGED
|
@@ -5,6 +5,7 @@ import { LintStaged } from './lint-staged.js';
|
|
|
5
5
|
import { Npmrc } from './npmrc.js';
|
|
6
6
|
import { Package } from './package.js';
|
|
7
7
|
import { Readme } from './readme/index.js';
|
|
8
|
+
import { Renovate } from './renovate.js';
|
|
8
9
|
import { TsConfig } from './ts-config.js';
|
|
9
10
|
function files(options) {
|
|
10
11
|
return [
|
|
@@ -12,7 +13,7 @@ function files(options) {
|
|
|
12
13
|
new File('.github/husky/pre-commit', { ...options, mode: 0o755 }),
|
|
13
14
|
new CiCd('.github/workflows/ci-cd.yml', options),
|
|
14
15
|
new LintStaged('.github/lint-staged.js', options),
|
|
15
|
-
new
|
|
16
|
+
new Renovate('.github/renovate.json', options),
|
|
16
17
|
new File('.editorconfig', options),
|
|
17
18
|
new File('.gitignore', options),
|
|
18
19
|
new Npmrc('.npmrc', options),
|
|
@@ -2,7 +2,7 @@ import ts from 'typescript';
|
|
|
2
2
|
import { File } from './file.js';
|
|
3
3
|
class LintStaged extends File {
|
|
4
4
|
constructor(path, options) {
|
|
5
|
-
super(path, { ...options, format: true });
|
|
5
|
+
super(path, { ...options, format: true, read: false });
|
|
6
6
|
}
|
|
7
7
|
process() {
|
|
8
8
|
this._content = ts.createPrinter().printFile(this.sourceFile());
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type Options } from '../options.js';
|
|
3
|
+
import { File } from './file.js';
|
|
4
|
+
declare const schema: z.ZodObject<{
|
|
5
|
+
$schema: z.ZodLiteral<"https://docs.renovatebot.com/renovate-schema.json">;
|
|
6
|
+
extends: z.ZodTuple<[z.ZodLiteral<"github>vidavidorra/.github">], null>;
|
|
7
|
+
packageRules: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
8
|
+
}, z.core.$strict>;
|
|
9
|
+
type Config = z.infer<typeof schema>;
|
|
10
|
+
declare class Renovate extends File {
|
|
11
|
+
protected readonly _config: Config;
|
|
12
|
+
constructor(path: string, options: Options);
|
|
13
|
+
get config(): {
|
|
14
|
+
$schema: "https://docs.renovatebot.com/renovate-schema.json";
|
|
15
|
+
extends: ["github>vidavidorra/.github"];
|
|
16
|
+
packageRules?: Record<string, unknown>[] | undefined;
|
|
17
|
+
};
|
|
18
|
+
process(): this;
|
|
19
|
+
}
|
|
20
|
+
export { type Config, Renovate };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { File } from './file.js';
|
|
3
|
+
const schema = z.strictObject({
|
|
4
|
+
'$schema': z.literal('https://docs.renovatebot.com/renovate-schema.json'),
|
|
5
|
+
extends: z.tuple([z.literal('github>vidavidorra/.github')]),
|
|
6
|
+
packageRules: z.array(z.record(z.string(), z.unknown())).optional(),
|
|
7
|
+
});
|
|
8
|
+
class Renovate extends File {
|
|
9
|
+
_config;
|
|
10
|
+
constructor(path, options) {
|
|
11
|
+
super(path, { ...options, format: true });
|
|
12
|
+
this._config = schema.parse(JSON.parse(this._content));
|
|
13
|
+
}
|
|
14
|
+
get config() {
|
|
15
|
+
return structuredClone(this._config);
|
|
16
|
+
}
|
|
17
|
+
process() {
|
|
18
|
+
delete this._config.packageRules;
|
|
19
|
+
this._content = JSON.stringify(this._config, undefined, 2);
|
|
20
|
+
return this;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export { Renovate };
|
|
24
|
+
//# sourceMappingURL=renovate.js.map
|
|
@@ -7,11 +7,11 @@ declare const schema: z.ZodObject<{
|
|
|
7
7
|
}, z.core.$loose>;
|
|
8
8
|
include: z.ZodArray<z.ZodString>;
|
|
9
9
|
}, z.core.$strict>;
|
|
10
|
-
type
|
|
10
|
+
type Config = z.infer<typeof schema>;
|
|
11
11
|
declare class TsConfig extends File {
|
|
12
|
-
protected readonly
|
|
12
|
+
protected readonly _config: Config;
|
|
13
13
|
constructor(path: string, options: Options);
|
|
14
|
-
get
|
|
14
|
+
get config(): {
|
|
15
15
|
compilerOptions: {
|
|
16
16
|
[x: string]: unknown;
|
|
17
17
|
allowJs?: boolean | undefined;
|
|
@@ -20,4 +20,4 @@ declare class TsConfig extends File {
|
|
|
20
20
|
};
|
|
21
21
|
process(): this;
|
|
22
22
|
}
|
|
23
|
-
export { TsConfig, type
|
|
23
|
+
export { TsConfig, type Config };
|
|
@@ -5,17 +5,17 @@ const schema = z.strictObject({
|
|
|
5
5
|
include: z.array(z.string()).min(1),
|
|
6
6
|
});
|
|
7
7
|
class TsConfig extends File {
|
|
8
|
-
|
|
8
|
+
_config;
|
|
9
9
|
constructor(path, options) {
|
|
10
10
|
super(path, { ...options, format: true });
|
|
11
|
-
this.
|
|
11
|
+
this._config = schema.parse(JSON.parse(this._content));
|
|
12
12
|
}
|
|
13
|
-
get
|
|
14
|
-
return structuredClone(this.
|
|
13
|
+
get config() {
|
|
14
|
+
return structuredClone(this._config);
|
|
15
15
|
}
|
|
16
16
|
process() {
|
|
17
|
-
delete this.
|
|
18
|
-
this._content = JSON.stringify(this.
|
|
17
|
+
delete this._config.compilerOptions.allowJs;
|
|
18
|
+
this._content = JSON.stringify(this._config, undefined, 2);
|
|
19
19
|
return this;
|
|
20
20
|
}
|
|
21
21
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vidavidorra/create-project",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Interactively create a GitHub project",
|
|
6
6
|
"keywords": [
|
|
@@ -208,7 +208,7 @@
|
|
|
208
208
|
"@semantic-release/changelog": "6.0.3",
|
|
209
209
|
"@semantic-release/exec": "7.1.0",
|
|
210
210
|
"@semantic-release/git": "10.0.1",
|
|
211
|
-
"@types/node": "24.10.
|
|
211
|
+
"@types/node": "24.10.3",
|
|
212
212
|
"@types/sinon": "21.0.0",
|
|
213
213
|
"@types/validate-npm-package-name": "4.0.2",
|
|
214
214
|
"@vidavidorra/commitlint-config": "7.1.6",
|