@dword-design/base 11.3.13 → 12.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/dist/cli.js +63 -66
- package/dist/commands/check-unknown-files/index.js +1 -1
- package/dist/commands/lint/index.js +2 -8
- package/dist/commands/prepare/__snapshots__/index.spec.js.snap +1 -1
- package/dist/commands/prepare/index.js +1 -1
- package/dist/commands/test-docker/index.js +1 -1
- package/dist/commands/test-raw/index.js +4 -4
- package/dist/get-depcheck-special-base/index.js +1 -1
- package/dist/get-generated-files/__snapshots__/index.spec.js.snap +2 -2
- package/dist/get-generated-files/common-editor-ignore.js +1 -1
- package/dist/get-generated-files/get-editor-ignore/__snapshots__/index.spec.js.snap +1 -1
- package/dist/get-generated-files/get-eslint/index.js +15 -3
- package/dist/get-generated-files/get-github-workflow/steps/get-test.js +1 -2
- package/dist/get-generated-files/get-release/index.js +1 -1
- package/dist/get-generated-files/get-renovate/index.js +2 -2
- package/dist/get-generated-files/get-vscode/__snapshots__/index.spec.js.snap +1 -1
- package/dist/get-generated-files/index.js +2 -4
- package/dist/get-git-info/index.js +2 -2
- package/dist/index.js +1 -1
- package/package.json +8 -8
package/dist/cli.js
CHANGED
|
@@ -3,74 +3,71 @@ import { mapValues, values } from '@dword-design/functions';
|
|
|
3
3
|
import makeCli from 'make-cli';
|
|
4
4
|
import { Base } from "./index.js";
|
|
5
5
|
import loadConfig from "./load-config/index.js";
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
'test:raw': {
|
|
46
|
-
arguments: '[patterns...]',
|
|
47
|
-
handler: (patterns, options) => base.testRaw({
|
|
48
|
-
patterns,
|
|
49
|
-
...options
|
|
50
|
-
}),
|
|
51
|
-
options: testOptions
|
|
52
|
-
}
|
|
53
|
-
}),
|
|
54
|
-
test: {
|
|
6
|
+
const base = new Base(await loadConfig());
|
|
7
|
+
const testOptions = [{
|
|
8
|
+
description: 'Only run tests matching this string or regexp',
|
|
9
|
+
name: '-g, --grep <grep>'
|
|
10
|
+
}, {
|
|
11
|
+
description: 'Update snapshots',
|
|
12
|
+
name: '-u, --update-snapshots'
|
|
13
|
+
}, {
|
|
14
|
+
description: 'Run tests in interactive UI mode',
|
|
15
|
+
name: '--ui-host <host>'
|
|
16
|
+
}, {
|
|
17
|
+
description: 'Host to serve UI on; specifying this option opens UI in a browser tab',
|
|
18
|
+
name: '--ui'
|
|
19
|
+
}];
|
|
20
|
+
try {
|
|
21
|
+
var _ref, _checkUnknownFiles$co, _base$config$commands;
|
|
22
|
+
await makeCli({
|
|
23
|
+
commands: (_ref = (_checkUnknownFiles$co = {
|
|
24
|
+
checkUnknownFiles: {
|
|
25
|
+
handler: () => base.checkUnknownFiles()
|
|
26
|
+
},
|
|
27
|
+
commit: {
|
|
28
|
+
handler: () => base.commit(),
|
|
29
|
+
options: [{
|
|
30
|
+
description: 'Allow empty commits',
|
|
31
|
+
name: '--allow-empty'
|
|
32
|
+
}]
|
|
33
|
+
},
|
|
34
|
+
depcheck: {
|
|
35
|
+
handler: () => base.depcheck()
|
|
36
|
+
},
|
|
37
|
+
lint: {
|
|
38
|
+
handler: () => base.lint()
|
|
39
|
+
},
|
|
40
|
+
prepare: {
|
|
41
|
+
handler: () => base.prepare()
|
|
42
|
+
},
|
|
43
|
+
...(base.config.testInContainer && {
|
|
44
|
+
'test:raw': {
|
|
55
45
|
arguments: '[patterns...]',
|
|
56
|
-
handler: (patterns, options) => base.
|
|
46
|
+
handler: (patterns, options) => base.testRaw({
|
|
57
47
|
patterns,
|
|
58
48
|
...options
|
|
59
49
|
}),
|
|
60
50
|
options: testOptions
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
|
|
51
|
+
}
|
|
52
|
+
}),
|
|
53
|
+
test: {
|
|
54
|
+
arguments: '[patterns...]',
|
|
55
|
+
handler: (patterns, options) => base.test({
|
|
56
|
+
patterns,
|
|
57
|
+
...options
|
|
58
|
+
}),
|
|
59
|
+
options: testOptions
|
|
60
|
+
},
|
|
61
|
+
...(_base$config$commands = base.config.commands, mapValues((command, name) => ({
|
|
62
|
+
...command,
|
|
63
|
+
handler: (...args) => base.run(name, ...args)
|
|
64
|
+
}))(_base$config$commands))
|
|
65
|
+
}, mapValues((command, name) => ({
|
|
66
|
+
name,
|
|
67
|
+
...command
|
|
68
|
+
}))(_checkUnknownFiles$co)), values(_ref))
|
|
69
|
+
});
|
|
70
|
+
} catch (error) {
|
|
71
|
+
console.error(error);
|
|
72
|
+
process.exit(1);
|
|
73
|
+
}
|
|
@@ -7,7 +7,6 @@ export default async function () {
|
|
|
7
7
|
const allowedMatches = [...(_this$generatedFiles = this.generatedFiles, keys(_this$generatedFiles)), ...Object.keys({
|
|
8
8
|
'.baserc.json': true,
|
|
9
9
|
'.env.schema.json': true,
|
|
10
|
-
'.eslintrc.json': true,
|
|
11
10
|
'.git': true,
|
|
12
11
|
'.husky/_': true,
|
|
13
12
|
'.husky/commit-msg': true,
|
|
@@ -21,6 +20,7 @@ export default async function () {
|
|
|
21
20
|
__snapshots__: true,
|
|
22
21
|
demo: true,
|
|
23
22
|
doc: true,
|
|
23
|
+
'eslint.config.js': true,
|
|
24
24
|
'global-test-hooks.js': true,
|
|
25
25
|
'pnpm-lock.yaml': true,
|
|
26
26
|
'pnpm-workspace.yaml': true,
|
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
import { execa } from 'execa';
|
|
2
|
-
import { createRequire } from 'module';
|
|
3
2
|
import parsePackagejsonName from 'parse-packagejson-name';
|
|
4
|
-
|
|
5
|
-
export default async function (options) {
|
|
3
|
+
export default async function () {
|
|
6
4
|
const packageName = parsePackagejsonName(this.packageConfig.name).fullName;
|
|
7
5
|
if (this.config.git !== undefined && packageName !== this.config.git.project) {
|
|
8
6
|
throw new Error(`Package name '${packageName}' has to be equal to repository name '${this.config.git.project}'`);
|
|
9
7
|
}
|
|
10
|
-
options = {
|
|
11
|
-
resolvePluginsRelativeTo: _require.resolve('@dword-design/eslint-config'),
|
|
12
|
-
...options
|
|
13
|
-
};
|
|
14
8
|
try {
|
|
15
|
-
await execa('eslint', ['--fix', '--ext', '.js,.json,.vue', '
|
|
9
|
+
await execa('eslint', ['--fix', '--ext', '.js,.json,.vue', '.'], {
|
|
16
10
|
all: true
|
|
17
11
|
});
|
|
18
12
|
} catch (error) {
|
|
@@ -8,7 +8,6 @@ Object {
|
|
|
8
8
|
".editorconfig": true,
|
|
9
9
|
".env.json": true,
|
|
10
10
|
".env.schema.json": true,
|
|
11
|
-
".eslintrc.json": true,
|
|
12
11
|
".git": true,
|
|
13
12
|
".gitattributes": true,
|
|
14
13
|
".github": true,
|
|
@@ -25,6 +24,7 @@ Object {
|
|
|
25
24
|
"LICENSE.md": true,
|
|
26
25
|
"README.md": true,
|
|
27
26
|
"babel.config.json": true,
|
|
27
|
+
"eslint.config.js": true,
|
|
28
28
|
"package.json": true,
|
|
29
29
|
"pnpm-lock.yaml": true,
|
|
30
30
|
"src": true,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';
|
|
1
2
|
import { first, keys } from '@dword-design/functions';
|
|
2
3
|
import packageName from 'depcheck-package-name';
|
|
3
4
|
import { execa, execaCommand } from 'execa';
|
|
4
5
|
import fs from 'fs-extra';
|
|
5
|
-
import { createRequire } from 'module';
|
|
6
6
|
import outputFiles from 'output-files';
|
|
7
7
|
const _require = createRequire(import.meta.url);
|
|
8
8
|
const commitlintPackageConfig = _require(packageName`@commitlint/cli/package.json`);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import os from 'node:os';
|
|
1
2
|
import { filter, flatMap, join, keys, map, replace } from '@dword-design/functions';
|
|
2
3
|
import { constantCase } from 'change-case';
|
|
3
4
|
import { execa } from 'execa';
|
|
4
5
|
import { findUpSync } from 'find-up';
|
|
5
6
|
import fs from 'fs-extra';
|
|
6
|
-
import os from 'os';
|
|
7
7
|
export default async function (options) {
|
|
8
8
|
var _ref, _this$packageConfig$n, _ref2, _ref3;
|
|
9
9
|
options = {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';
|
|
2
|
+
import P from 'node:path';
|
|
1
3
|
import { endent, includes } from '@dword-design/functions';
|
|
2
4
|
import Ajv from 'ajv';
|
|
3
5
|
import packageName from 'depcheck-package-name';
|
|
4
6
|
import { execa } from 'execa';
|
|
5
7
|
import fs from 'fs-extra';
|
|
6
|
-
import { createRequire } from 'module';
|
|
7
|
-
import P from 'path';
|
|
8
8
|
import isCI from "./is-ci.js";
|
|
9
9
|
import packageJsonSchema from "./package-json-schema.js";
|
|
10
10
|
const _require = createRequire(import.meta.url);
|
|
@@ -30,12 +30,12 @@ export default async function (options) {
|
|
|
30
30
|
await this.depcheck();
|
|
31
31
|
}
|
|
32
32
|
const runDockerTests = !isCI() || !(_ref = ['win32', 'darwin'], includes(process.platform)(_ref));
|
|
33
|
-
return execa(this.packageConfig.type === 'module' ? packageName`c8` : packageName`nyc`, this.config.testRunner === 'playwright' ? ['playwright', 'test', '--pass-with-no-tests', ...(runDockerTests ? [] : ['--grep-invert', '@usesdocker']), ...(options.updateSnapshots ? ['--update-snapshots'] : []), ...(options.ui ? ['--ui'] : []), ...(options.uiHost ? ['--ui-host', options.uiHost] : []), ...(options.grep ? ['--grep', options.grep] : []), '--trace', 'retain-on-failure', ...(isCI() ? ['--forbid-only'] : []),
|
|
33
|
+
return execa(this.packageConfig.type === 'module' ? packageName`c8` : packageName`nyc`, [...(this.packageConfig.type === 'module' ? ['--exclude', 'eslint.config.js'] : []), ...(this.config.testRunner === 'playwright' ? ['playwright', 'test', '--pass-with-no-tests', ...(runDockerTests ? [] : ['--grep-invert', '@usesdocker']), ...(options.updateSnapshots ? ['--update-snapshots'] : []), ...(options.ui ? ['--ui'] : []), ...(options.uiHost ? ['--ui-host', options.uiHost] : []), ...(options.grep ? ['--grep', options.grep] : []), '--trace', 'retain-on-failure', ...(isCI() ? ['--forbid-only'] : []),
|
|
34
34
|
/**
|
|
35
35
|
* Reporter set to dot in CI environments by default.
|
|
36
36
|
* See https://github.com/microsoft/playwright/blob/42ade54975f6990c41cddc7b6e11c46a36648d0d/packages/playwright/src/common/config.ts#L301.
|
|
37
37
|
*/
|
|
38
|
-
'--reporter', 'list', ...options.patterns] : ['--reporter', 'lcov', '--reporter', 'text', '--cwd', process.cwd(), '--all', '--exclude', '**/*.spec.js', '--exclude', 'coverage', '--exclude', 'tmp-*', '--exclude', 'dist', 'mocha', '--reporter', _require.resolve(packageName`mocha-spec-reporter-with-file-names`), '--ui', packageName`mocha-ui-exports-auto-describe`, '--require', packageName`@dword-design/pretest`, ...((await fs.exists(P.join('global-test-hooks.js'))) ? ['--require', 'global-test-hooks.js'] : []), '--file', _require.resolve(packageName`@dword-design/setup-test`), ...(runDockerTests ? [] : ['--ignore', '**/*.usesdocker.spec.js']), '--timeout',
|
|
38
|
+
'--reporter', 'list', ...options.patterns] : ['--reporter', 'lcov', '--reporter', 'text', '--cwd', process.cwd(), '--all', '--exclude', '**/*.spec.js', '--exclude', 'coverage', '--exclude', 'tmp-*', '--exclude', 'dist', 'mocha', '--reporter', _require.resolve(packageName`mocha-spec-reporter-with-file-names`), '--ui', packageName`mocha-ui-exports-auto-describe`, '--require', packageName`@dword-design/pretest`, ...((await fs.exists(P.join('global-test-hooks.js'))) ? ['--require', 'global-test-hooks.js'] : []), '--file', _require.resolve(packageName`@dword-design/setup-test`), ...(runDockerTests ? [] : ['--ignore', '**/*.usesdocker.spec.js']), '--timeout', 130_000, ...(options.patterns.length > 0 ? options.patterns : ['{,!(node_modules)/**/}*.spec.js']), ...(options.grep ? ['--grep', options.grep] : []), ...(process.platform === 'win32' ? ['--exit'] : [])])], {
|
|
39
39
|
env: {
|
|
40
40
|
NODE_ENV: 'test',
|
|
41
41
|
...(this.packageConfig.type === 'module' && {
|
|
@@ -6,7 +6,6 @@ Array [
|
|
|
6
6
|
".commitlintrc.json",
|
|
7
7
|
".cz.json",
|
|
8
8
|
".editorconfig",
|
|
9
|
-
".eslintrc.json",
|
|
10
9
|
".gitattributes",
|
|
11
10
|
".github/DEPRECATED_DEPENDENCIES_ISSUE_TEMPLATE.md",
|
|
12
11
|
".github/labels.yml",
|
|
@@ -22,6 +21,7 @@ Array [
|
|
|
22
21
|
".vscode/settings.json",
|
|
23
22
|
"LICENSE.md",
|
|
24
23
|
"README.md",
|
|
24
|
+
"eslint.config.js",
|
|
25
25
|
"package.json",
|
|
26
26
|
]
|
|
27
27
|
`;
|
|
@@ -32,7 +32,6 @@ Array [
|
|
|
32
32
|
".cz.json",
|
|
33
33
|
".devcontainer/devcontainer.json",
|
|
34
34
|
".editorconfig",
|
|
35
|
-
".eslintrc.json",
|
|
36
35
|
".gitattributes",
|
|
37
36
|
".github/DEPRECATED_DEPENDENCIES_ISSUE_TEMPLATE.md",
|
|
38
37
|
".github/FUNDING.yml",
|
|
@@ -51,6 +50,7 @@ Array [
|
|
|
51
50
|
"LICENSE.md",
|
|
52
51
|
"README.md",
|
|
53
52
|
"babel.config.json",
|
|
53
|
+
"eslint.config.js",
|
|
54
54
|
"package.json",
|
|
55
55
|
]
|
|
56
56
|
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default ['babel.config.json', '.commitlintrc.json', '.cz.json', '.devcontainer', '.editorconfig', '.
|
|
1
|
+
export default ['babel.config.json', '.commitlintrc.json', '.cz.json', '.devcontainer', '.editorconfig', 'eslint.config.js', '.gitattributes', '.github', '.gitignore', '.gitpod.Dockerfile', '.gitpod.yml', '.husky', '.npmrc', '.nyc_output', '.releaserc.json', '.renovaterc.json', '.vscode', 'CHANGELOG.md', 'coverage', 'LICENSE.md', 'node_modules', 'pnpm-lock.yaml'];
|
|
@@ -6,7 +6,6 @@ Array [
|
|
|
6
6
|
".cz.json",
|
|
7
7
|
".devcontainer",
|
|
8
8
|
".editorconfig",
|
|
9
|
-
".eslintrc.json",
|
|
10
9
|
".gitattributes",
|
|
11
10
|
".github",
|
|
12
11
|
".gitignore",
|
|
@@ -22,6 +21,7 @@ Array [
|
|
|
22
21
|
"LICENSE.md",
|
|
23
22
|
"babel.config.json",
|
|
24
23
|
"coverage",
|
|
24
|
+
"eslint.config.js",
|
|
25
25
|
"foo",
|
|
26
26
|
"node_modules",
|
|
27
27
|
"pnpm-lock.yaml",
|
|
@@ -1,6 +1,18 @@
|
|
|
1
|
+
import { endent } from '@dword-design/functions';
|
|
1
2
|
import packageName from 'depcheck-package-name';
|
|
2
3
|
export default function () {
|
|
3
|
-
return this.config.eslintConfig ||
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
return this.config.eslintConfig || endent`
|
|
5
|
+
import { defineConfig } from '${packageName`eslint`}/config';
|
|
6
|
+
import config from '${packageName`@dword-design/eslint-config`}';
|
|
7
|
+
|
|
8
|
+
export default defineConfig([
|
|
9
|
+
config,
|
|
10
|
+
{
|
|
11
|
+
files: ['eslint.config.js'],
|
|
12
|
+
rules: {
|
|
13
|
+
'import/no-extraneous-dependencies': 'off',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
]);\n
|
|
17
|
+
`;
|
|
6
18
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import P from 'node:path';
|
|
1
2
|
import { endent, fromPairs, keys, map } from '@dword-design/functions';
|
|
2
3
|
import { constantCase } from 'change-case';
|
|
3
4
|
import { findUpStop, findUpSync } from 'find-up';
|
|
4
5
|
import fs from 'fs-extra';
|
|
5
|
-
import P from 'path';
|
|
6
6
|
import gitHubAction from 'tagged-template-noop';
|
|
7
7
|
export default () => {
|
|
8
8
|
var _ref, _ref2, _ref3, _envVariableNames;
|
|
@@ -13,7 +13,6 @@ export default () => {
|
|
|
13
13
|
if (fs.existsSync(P.join(path, 'package.json'))) {
|
|
14
14
|
return findUpStop;
|
|
15
15
|
}
|
|
16
|
-
return undefined;
|
|
17
16
|
});
|
|
18
17
|
const envVariableNames = (_ref = (_ref2 = envSchemaPath ? fs.readJsonSync(envSchemaPath) : {}, keys(_ref2)), map(name => {
|
|
19
18
|
var _name;
|
|
@@ -3,7 +3,7 @@ export default function () {
|
|
|
3
3
|
return {
|
|
4
4
|
plugins: ['@semantic-release/commit-analyzer', '@semantic-release/release-notes-generator', packageName`@semantic-release/changelog`, this.config.npmPublish ? packageName`@semantic-release/npm` : [packageName`@semantic-release/npm`, {
|
|
5
5
|
npmPublish: false
|
|
6
|
-
}], this.config.deployAssets.length ? [packageName`@semantic-release/github`, {
|
|
6
|
+
}], this.config.deployAssets.length > 0 ? [packageName`@semantic-release/github`, {
|
|
7
7
|
assets: this.config.deployAssets
|
|
8
8
|
}] : packageName`@semantic-release/github`, [packageName`@semantic-release/git`, {
|
|
9
9
|
message: 'chore: ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}'
|
|
@@ -18,13 +18,13 @@ export default function () {
|
|
|
18
18
|
rangeStrategy: 'replace',
|
|
19
19
|
regexManagers: [{
|
|
20
20
|
datasourceTemplate: 'github-tags',
|
|
21
|
-
fileMatch: [
|
|
21
|
+
fileMatch: [String.raw`\.js$`],
|
|
22
22
|
matchStrings: [getRegexManagerString('gitHubAction', '(?<depName>.*?)@v(?<currentValue>.*?)')],
|
|
23
23
|
versioningTemplate: 'npm'
|
|
24
24
|
}, {
|
|
25
25
|
datasourceTemplate: 'node-version',
|
|
26
26
|
depNameTemplate: 'node',
|
|
27
|
-
fileMatch: [
|
|
27
|
+
fileMatch: [String.raw`\.js$`],
|
|
28
28
|
matchStrings: [getRegexManagerString('nodejsVersion', '(?<currentValue>.*?)')],
|
|
29
29
|
versioningTemplate: 'node'
|
|
30
30
|
}],
|
|
@@ -9,7 +9,6 @@ Object {
|
|
|
9
9
|
".cz.json": true,
|
|
10
10
|
".devcontainer": true,
|
|
11
11
|
".editorconfig": true,
|
|
12
|
-
".eslintrc.json": true,
|
|
13
12
|
".gitattributes": true,
|
|
14
13
|
".github": true,
|
|
15
14
|
".gitignore": true,
|
|
@@ -26,6 +25,7 @@ Object {
|
|
|
26
25
|
"babel.config.json": true,
|
|
27
26
|
"bar": true,
|
|
28
27
|
"coverage": true,
|
|
28
|
+
"eslint.config.js": true,
|
|
29
29
|
"foo": true,
|
|
30
30
|
"node_modules": true,
|
|
31
31
|
"pnpm-lock.yaml": true,
|
|
@@ -14,7 +14,7 @@ import githubLabelsConfig from "./github-labels.js";
|
|
|
14
14
|
import githubSyncLabelsConfig from "./github-sync-labels.js";
|
|
15
15
|
import npmrc from "./npmrc.js";
|
|
16
16
|
export default function () {
|
|
17
|
-
var _commitlintConfig, _commitizenConfig, _this$githubCodespace,
|
|
17
|
+
var _commitlintConfig, _commitizenConfig, _this$githubCodespace, _githubFunding, _sortKeys, _sortKeys2, _sortKeys3, _sortKeys4, _sortKeys5, _ref, _this$getGitignoreCon, _this$getGitpodConfig, _this$getReleaseConfi, _sortKeys6, _this$getVscodeConfig, _babelConfig, _ref2, _packageConfig;
|
|
18
18
|
const packageConfig = this.getPackageConfig();
|
|
19
19
|
return {
|
|
20
20
|
'.commitlintrc.json': `${_commitlintConfig = commitlintConfig, jsonToString({
|
|
@@ -27,9 +27,6 @@ export default function () {
|
|
|
27
27
|
indent: 2
|
|
28
28
|
})(_this$githubCodespace)}\n`,
|
|
29
29
|
'.editorconfig': editorconfigConfig,
|
|
30
|
-
'.eslintrc.json': `${_this$getEslintConfig = this.getEslintConfig(), jsonToString({
|
|
31
|
-
indent: 2
|
|
32
|
-
})(_this$getEslintConfig)}\n`,
|
|
33
30
|
'.gitattributes': gitattributesConfig,
|
|
34
31
|
'.github/DEPRECATED_DEPENDENCIES_ISSUE_TEMPLATE.md': deprecatedDependenciesIssueTemplate,
|
|
35
32
|
'.github/FUNDING.yml': (_githubFunding = githubFunding, yaml.stringify(_githubFunding)),
|
|
@@ -68,6 +65,7 @@ export default function () {
|
|
|
68
65
|
'babel.config.json': `${_babelConfig = babelConfig, jsonToString({
|
|
69
66
|
indent: 2
|
|
70
67
|
})(_babelConfig)}\n`,
|
|
68
|
+
'eslint.config.js': this.getEslintConfig(),
|
|
71
69
|
'package.json': `${_ref2 = (_packageConfig = packageConfig, sortPackageJson(_packageConfig)), jsonToString({
|
|
72
70
|
indent: 2
|
|
73
71
|
})(_ref2)}\n`
|
|
@@ -3,11 +3,11 @@ import hostedGitInfo from 'hosted-git-info';
|
|
|
3
3
|
import parseGitConfig from 'parse-git-config';
|
|
4
4
|
export default () => {
|
|
5
5
|
if (!fs.existsSync('.git')) {
|
|
6
|
-
return
|
|
6
|
+
return;
|
|
7
7
|
}
|
|
8
8
|
const gitUrl = parseGitConfig.sync()['remote "origin"']?.url;
|
|
9
9
|
if (gitUrl === undefined) {
|
|
10
|
-
return
|
|
10
|
+
return;
|
|
11
11
|
}
|
|
12
12
|
const gitInfo = hostedGitInfo.fromUrl(gitUrl) || {};
|
|
13
13
|
if (gitInfo.type !== 'github') {
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import P from 'node:path';
|
|
1
2
|
import { endent, filter, flatMap, identity, mapValues } from '@dword-design/functions';
|
|
2
3
|
import jitiBabelTransform from '@dword-design/jiti-babel-transform';
|
|
3
4
|
import deepmerge from 'deepmerge';
|
|
@@ -9,7 +10,6 @@ import packageName from 'depcheck-package-name';
|
|
|
9
10
|
import depcheckParserBabel from 'depcheck-parser-babel';
|
|
10
11
|
import fs from 'fs-extra';
|
|
11
12
|
import jiti from 'jiti';
|
|
12
|
-
import P from 'path';
|
|
13
13
|
import { transform as pluginNameToPackageName } from 'plugin-name-to-package-name';
|
|
14
14
|
import checkUnknownFiles from "./commands/check-unknown-files/index.js";
|
|
15
15
|
import commit from "./commands/commit/index.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dword-design/base",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.0.0",
|
|
4
4
|
"description": "Base package for projects.",
|
|
5
5
|
"repository": "dword-design/base",
|
|
6
6
|
"funding": "https://github.com/sponsors/dword-design",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"@commitlint/cli": "^18.6.1",
|
|
28
28
|
"@commitlint/config-conventional": "^18.6.3",
|
|
29
29
|
"@dword-design/babel-config": "^4.2.1",
|
|
30
|
-
"@dword-design/base-config-node": "^3.0.
|
|
30
|
+
"@dword-design/base-config-node": "^3.0.3",
|
|
31
31
|
"@dword-design/ci": "^4.0.6",
|
|
32
|
-
"@dword-design/eslint-config": "^
|
|
32
|
+
"@dword-design/eslint-config": "^6.0.1",
|
|
33
33
|
"@dword-design/functions": "^6.0.2",
|
|
34
34
|
"@dword-design/jiti-babel-transform": "^2.0.0",
|
|
35
35
|
"@dword-design/personal-data": "^2.0.3",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"depcheck-detector-package-name": "^3.0.4",
|
|
53
53
|
"depcheck-package-name": "^3.0.1",
|
|
54
54
|
"depcheck-parser-babel": "^3.0.57",
|
|
55
|
-
"eslint": "^
|
|
56
|
-
"execa": "^9.5.
|
|
55
|
+
"eslint": "^9.27.0",
|
|
56
|
+
"execa": "^9.5.3",
|
|
57
57
|
"find-up": "^7.0.0",
|
|
58
58
|
"fs-extra": "^11.3.0",
|
|
59
59
|
"get-projectz-readme-section-regex": "^3.0.10",
|
|
@@ -81,10 +81,10 @@
|
|
|
81
81
|
"spdx-license-list": "^6.10.0",
|
|
82
82
|
"suppress-experimental-warnings": "^2.0.0",
|
|
83
83
|
"tagged-template-noop": "^2.1.1",
|
|
84
|
-
"yaml": "^2.
|
|
84
|
+
"yaml": "^2.8.0"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
|
-
"@babel/cli": "^7.27.
|
|
87
|
+
"@babel/cli": "^7.27.2",
|
|
88
88
|
"@dword-design/chdir": "^3.0.2",
|
|
89
89
|
"@dword-design/dotenv-json-extended": "^2.0.25",
|
|
90
90
|
"@dword-design/tester": "^2.0.19",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"p-event": "^6.0.1",
|
|
94
94
|
"renovate": "^39.264.0",
|
|
95
95
|
"rimraf": "^5.0.10",
|
|
96
|
-
"sharp": "^0.34.
|
|
96
|
+
"sharp": "^0.34.2",
|
|
97
97
|
"unify-mocha-output": "^2.0.22"
|
|
98
98
|
},
|
|
99
99
|
"packageManager": "pnpm@10.10.0+sha512.d615db246fe70f25dcfea6d8d73dee782ce23e2245e3c4f6f888249fb568149318637dca73c2c5c8ef2a4ca0d5657fb9567188bfab47f566d1ee6ce987815c39",
|