@dword-design/base 11.2.11 → 11.3.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/LICENSE.md +14 -5
- package/dist/__snapshots__/index.spec.js.snap +2 -0
- package/dist/commands/check-unknown-files/unknown-files-error.js +1 -1
- package/dist/commands/commit/index.js +2 -2
- package/dist/commands/depcheck/index.js +5 -5
- package/dist/commands/prepare/index.js +1 -1
- package/dist/commands/test-docker/index.js +1 -1
- package/dist/commands/test-raw/index.js +10 -3
- package/dist/commands/test-raw/is-ci.js +2 -2
- package/dist/get-depcheck-special-base/index.js +2 -2
- package/dist/get-generated-files/get-github-workflow/__snapshots__/index.spec.js.snap +16 -8
- package/dist/get-generated-files/get-github-workflow/steps/get-release.js +2 -2
- package/dist/get-generated-files/get-github-workflow/steps/get-test.js +8 -5
- package/dist/get-generated-files/get-github-workflow/strategies/job-matrix.js +2 -2
- package/dist/get-generated-files/get-github-workflow/strategies/simple.js +2 -2
- package/dist/get-generated-files/get-gitignore/index.js +1 -2
- package/dist/get-generated-files/get-readme-string/replacements.js +4 -4
- package/dist/get-generated-files/get-renovate/get-regex-manager-string/index.js +1 -1
- package/dist/get-generated-files/index.js +18 -18
- package/dist/get-git-info/index.js +2 -2
- package/dist/index.js +1 -0
- package/dist/load-config/index.js +2 -2
- package/package.json +49 -48
- package/dist/get-generated-files/common-gitignore.js +0 -1
package/LICENSE.md
CHANGED
|
@@ -14,8 +14,17 @@ MIT License
|
|
|
14
14
|
|
|
15
15
|
Copyright (c) <year> <copyright holders>
|
|
16
16
|
|
|
17
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
|
18
|
+
associated documentation files (the "Software"), to deal in the Software without restriction, including
|
|
19
|
+
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
20
|
+
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
|
|
21
|
+
following conditions:
|
|
22
|
+
|
|
23
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial
|
|
24
|
+
portions of the Software.
|
|
25
|
+
|
|
26
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
|
27
|
+
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
|
|
28
|
+
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
29
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
30
|
+
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -7,7 +7,7 @@ export default class extends Error {
|
|
|
7
7
|
super(endent`
|
|
8
8
|
There are files in this repository that are not known to ${packageConfig.name}. Let's discuss about them in a PR!
|
|
9
9
|
|
|
10
|
-
${
|
|
10
|
+
${_ref = (_ref2 = (_ref3 = (_files = files, keys(_files)), map(file => `* ${file}`)(_ref3)), sortBy(identity)(_ref2)), join('\n')(_ref)}
|
|
11
11
|
`);
|
|
12
12
|
}
|
|
13
13
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { execa } from 'execa';
|
|
2
|
-
export default (
|
|
2
|
+
export default (options = {}) => execa('git-cz', [...(options.allowEmpty ? ['--allow-empty'] : [])], {
|
|
3
3
|
stdio: options.log === false ? 'pipe' : 'inherit'
|
|
4
|
-
})
|
|
4
|
+
});
|
|
@@ -6,13 +6,13 @@ export default async function () {
|
|
|
6
6
|
package: (_this$packageConfig = this.packageConfig, omit(['devDependencies'])(_this$packageConfig)),
|
|
7
7
|
skipMissing: true,
|
|
8
8
|
...this.config.depcheckConfig,
|
|
9
|
-
ignorePatterns: ['*.spec.js', '/global-test-hooks.js', 'package.json']
|
|
9
|
+
ignorePatterns: ['*.spec.js', this.config.testRunner === 'playwright' ? '/playwright.config.js' : '/global-test-hooks.js', 'package.json']
|
|
10
10
|
});
|
|
11
11
|
const devDependenciesResult = await depcheck('.', {
|
|
12
12
|
package: (_this$packageConfig2 = this.packageConfig, omit(['dependencies'])(_this$packageConfig2)),
|
|
13
13
|
skipMissing: true,
|
|
14
14
|
...this.config.depcheckConfig,
|
|
15
|
-
ignorePatterns: ['!*.spec.js', '!/global-test-hooks.js']
|
|
15
|
+
ignorePatterns: ['!*.spec.js', this.config.testRunner === 'playwright' ? '!/playwright.config.js' : '!/global-test-hooks.js']
|
|
16
16
|
});
|
|
17
17
|
const result = {
|
|
18
18
|
dependencies: dependenciesResult.dependencies,
|
|
@@ -24,13 +24,13 @@ export default async function () {
|
|
|
24
24
|
};
|
|
25
25
|
const errorMessage = (_ref = [...(result.dependencies.length > 0 ? [endent`
|
|
26
26
|
Unused dependencies
|
|
27
|
-
${
|
|
27
|
+
${_ref2 = (_result$dependencies = result.dependencies, map(dep => `* ${dep}`)(_result$dependencies)), join('\n')(_ref2)}
|
|
28
28
|
`] : []), ...(result.devDependencies.length > 0 ? [endent`
|
|
29
29
|
Unused devDependencies
|
|
30
|
-
${
|
|
30
|
+
${_ref3 = (_result$devDependenci = result.devDependencies, map(dep => `* ${dep}`)(_result$devDependenci)), join('\n')(_ref3)}
|
|
31
31
|
`] : []), ...(isEmpty(result.invalidFiles) ? [] : [endent`
|
|
32
32
|
Invalid files
|
|
33
|
-
${
|
|
33
|
+
${_ref4 = (_ref5 = (_result$invalidFiles = result.invalidFiles, mapValues((error, name) => `* ${name}: ${error}`)(_result$invalidFiles)), values(_ref5)), join('\n')(_ref4)}
|
|
34
34
|
`])], join('\n\n')(_ref));
|
|
35
35
|
if (errorMessage) {
|
|
36
36
|
throw new Error(errorMessage);
|
|
@@ -11,7 +11,7 @@ export default async function () {
|
|
|
11
11
|
if (await fs.exists('.git')) {
|
|
12
12
|
var _ref, _commitlintPackageCon;
|
|
13
13
|
await execaCommand('husky install');
|
|
14
|
-
await execa('husky', ['set', '.husky/commit-msg', `npx ${
|
|
14
|
+
await execa('husky', ['set', '.husky/commit-msg', `npx ${_ref = (_commitlintPackageCon = commitlintPackageConfig.bin, keys(_commitlintPackageCon)), first(_ref)} --edit "$1"`]);
|
|
15
15
|
}
|
|
16
16
|
await this.config.prepare();
|
|
17
17
|
}
|
|
@@ -15,7 +15,7 @@ export default async function (options) {
|
|
|
15
15
|
const envSchemaPath = findUpSync('.env.schema.json');
|
|
16
16
|
const envVariableNames = (_ref2 = (_ref3 = envSchemaPath ? await fs.readJson(envSchemaPath) : {}, keys(_ref3)), map(name => {
|
|
17
17
|
var _name;
|
|
18
|
-
return `TEST_${
|
|
18
|
+
return `TEST_${_name = name, constantCase(_name)}`;
|
|
19
19
|
})(_ref2));
|
|
20
20
|
const userInfo = os.userInfo();
|
|
21
21
|
try {
|
|
@@ -30,15 +30,22 @@ 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`,
|
|
33
|
+
return execa(this.packageConfig.type === 'module' ? packageName`c8` : packageName`nyc`, this.config.testRunner === 'playwright' ? ['playwright', 'test', ...(options.updateSnapshots ? ['--update-snapshots'] : []), ...(options.ui ? ['--ui'] : []), ...(options.uiHost ? ['--ui-host', options.uiHost] : []), ...(options.grep ? ['--grep', options.grep] : []), '--timeout', 130000, '--trace', 'retain-on-failure',
|
|
34
|
+
/**
|
|
35
|
+
* Reporter set to dot in CI environments by default.
|
|
36
|
+
* See https://github.com/microsoft/playwright/blob/42ade54975f6990c41cddc7b6e11c46a36648d0d/packages/playwright/src/common/config.ts#L301.
|
|
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', 130000, ...(options.patterns.length > 0 ? options.patterns : ['{,!(node_modules)/**/}*.spec.js']), ...(options.grep ? ['--grep', options.grep] : []), ...(process.platform === 'win32' ? ['--exit'] : [])], {
|
|
34
39
|
env: {
|
|
35
40
|
NODE_ENV: 'test',
|
|
36
41
|
...(this.packageConfig.type === 'module' && {
|
|
37
42
|
NODE_OPTIONS: `--require=${packageName`suppress-experimental-warnings`} --require=${packageName`@dword-design/suppress-babel-register-esm-warning`} --experimental-loader=${packageName`babel-register-esm`}`
|
|
38
43
|
}),
|
|
39
|
-
...(
|
|
44
|
+
...(this.config.testRunner === 'playwright' ? {
|
|
45
|
+
PW_DISABLE_TS_ESM: true
|
|
46
|
+
} : options.updateSnapshots ? {
|
|
40
47
|
SNAPSHOT_UPDATE: 1
|
|
41
|
-
})
|
|
48
|
+
} : {})
|
|
42
49
|
},
|
|
43
50
|
...(options.log ? {
|
|
44
51
|
stdio: 'inherit'
|
|
@@ -109,7 +109,8 @@ Object {
|
|
|
109
109
|
"uses": "actions/upload-artifact@v4",
|
|
110
110
|
"with": Object {
|
|
111
111
|
"name": "Image Snapshot Diffs",
|
|
112
|
-
"path": "**/__image_snapshots__/__diff_output__
|
|
112
|
+
"path": "**/__image_snapshots__/__diff_output__
|
|
113
|
+
test-results",
|
|
113
114
|
},
|
|
114
115
|
},
|
|
115
116
|
Object {
|
|
@@ -265,7 +266,8 @@ Object {
|
|
|
265
266
|
"uses": "actions/upload-artifact@v4",
|
|
266
267
|
"with": Object {
|
|
267
268
|
"name": "Image Snapshot Diffs",
|
|
268
|
-
"path": "**/__image_snapshots__/__diff_output__
|
|
269
|
+
"path": "**/__image_snapshots__/__diff_output__
|
|
270
|
+
test-results",
|
|
269
271
|
},
|
|
270
272
|
},
|
|
271
273
|
Object {
|
|
@@ -417,7 +419,8 @@ Object {
|
|
|
417
419
|
"uses": "actions/upload-artifact@v4",
|
|
418
420
|
"with": Object {
|
|
419
421
|
"name": "Image Snapshot Diffs",
|
|
420
|
-
"path": "**/__image_snapshots__/__diff_output__
|
|
422
|
+
"path": "**/__image_snapshots__/__diff_output__
|
|
423
|
+
test-results",
|
|
421
424
|
},
|
|
422
425
|
},
|
|
423
426
|
Object {
|
|
@@ -514,7 +517,8 @@ Object {
|
|
|
514
517
|
"uses": "actions/upload-artifact@v4",
|
|
515
518
|
"with": Object {
|
|
516
519
|
"name": "Image Snapshot Diffs",
|
|
517
|
-
"path": "**/__image_snapshots__/__diff_output__
|
|
520
|
+
"path": "**/__image_snapshots__/__diff_output__
|
|
521
|
+
test-results",
|
|
518
522
|
},
|
|
519
523
|
},
|
|
520
524
|
Object {
|
|
@@ -667,7 +671,8 @@ Object {
|
|
|
667
671
|
"uses": "actions/upload-artifact@v4",
|
|
668
672
|
"with": Object {
|
|
669
673
|
"name": "Image Snapshot Diffs",
|
|
670
|
-
"path": "**/__image_snapshots__/__diff_output__
|
|
674
|
+
"path": "**/__image_snapshots__/__diff_output__
|
|
675
|
+
test-results",
|
|
671
676
|
},
|
|
672
677
|
},
|
|
673
678
|
Object {
|
|
@@ -825,7 +830,8 @@ Object {
|
|
|
825
830
|
"uses": "actions/upload-artifact@v4",
|
|
826
831
|
"with": Object {
|
|
827
832
|
"name": "Image Snapshot Diffs",
|
|
828
|
-
"path": "**/__image_snapshots__/__diff_output__
|
|
833
|
+
"path": "**/__image_snapshots__/__diff_output__
|
|
834
|
+
test-results",
|
|
829
835
|
},
|
|
830
836
|
},
|
|
831
837
|
Object {
|
|
@@ -1075,7 +1081,8 @@ Object {
|
|
|
1075
1081
|
"uses": "actions/upload-artifact@v4",
|
|
1076
1082
|
"with": Object {
|
|
1077
1083
|
"name": "Image Snapshot Diffs",
|
|
1078
|
-
"path": "**/__image_snapshots__/__diff_output__
|
|
1084
|
+
"path": "**/__image_snapshots__/__diff_output__
|
|
1085
|
+
test-results",
|
|
1079
1086
|
},
|
|
1080
1087
|
},
|
|
1081
1088
|
Object {
|
|
@@ -1172,7 +1179,8 @@ Object {
|
|
|
1172
1179
|
"uses": "actions/upload-artifact@v4",
|
|
1173
1180
|
"with": Object {
|
|
1174
1181
|
"name": "Image Snapshot Diffs",
|
|
1175
|
-
"path": "**/__image_snapshots__/__diff_output__
|
|
1182
|
+
"path": "**/__image_snapshots__/__diff_output__
|
|
1183
|
+
test-results",
|
|
1176
1184
|
},
|
|
1177
1185
|
},
|
|
1178
1186
|
Object {
|
|
@@ -2,7 +2,7 @@ import { map } from '@dword-design/functions';
|
|
|
2
2
|
import packageName from 'depcheck-package-name';
|
|
3
3
|
import parsePackagejsonName from 'parse-packagejson-name';
|
|
4
4
|
const ci = `dw-${parsePackagejsonName(packageName`@dword-design/ci`).fullName}`;
|
|
5
|
-
export default
|
|
5
|
+
export default config => {
|
|
6
6
|
var _ref;
|
|
7
7
|
return [{
|
|
8
8
|
env: {
|
|
@@ -25,4 +25,4 @@ export default (config => {
|
|
|
25
25
|
if: "github.ref == 'refs/heads/master'",
|
|
26
26
|
...step
|
|
27
27
|
}))(_ref))];
|
|
28
|
-
}
|
|
28
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { fromPairs, keys, map } from '@dword-design/functions';
|
|
1
|
+
import { endent, fromPairs, keys, map } from '@dword-design/functions';
|
|
2
2
|
import { constantCase } from 'change-case';
|
|
3
3
|
import { findUpStop, findUpSync } from 'find-up';
|
|
4
4
|
import fs from 'fs-extra';
|
|
5
5
|
import P from 'path';
|
|
6
6
|
import gitHubAction from 'tagged-template-noop';
|
|
7
|
-
export default (
|
|
7
|
+
export default () => {
|
|
8
8
|
var _ref, _ref2, _ref3, _envVariableNames;
|
|
9
9
|
const envSchemaPath = findUpSync(path => {
|
|
10
10
|
if (fs.existsSync('.env.schema.json')) {
|
|
@@ -17,7 +17,7 @@ export default (() => {
|
|
|
17
17
|
});
|
|
18
18
|
const envVariableNames = (_ref = (_ref2 = envSchemaPath ? fs.readJsonSync(envSchemaPath) : {}, keys(_ref2)), map(name => {
|
|
19
19
|
var _name;
|
|
20
|
-
return `TEST_${
|
|
20
|
+
return `TEST_${_name = name, constantCase(_name)}`;
|
|
21
21
|
})(_ref));
|
|
22
22
|
return [{
|
|
23
23
|
env: {
|
|
@@ -30,7 +30,10 @@ export default (() => {
|
|
|
30
30
|
uses: gitHubAction`actions/upload-artifact@v4`,
|
|
31
31
|
with: {
|
|
32
32
|
name: 'Image Snapshot Diffs',
|
|
33
|
-
path:
|
|
33
|
+
path: endent`
|
|
34
|
+
**/__image_snapshots__/__diff_output__
|
|
35
|
+
test-results
|
|
36
|
+
`
|
|
34
37
|
}
|
|
35
38
|
}];
|
|
36
|
-
}
|
|
39
|
+
};
|
|
@@ -5,7 +5,7 @@ import checkUnknownFilesSteps from "../steps/check-unknown-files.js";
|
|
|
5
5
|
import coverageSteps from "../steps/coverage.js";
|
|
6
6
|
import getReleaseSteps from "../steps/get-release.js";
|
|
7
7
|
import getTestSteps from "../steps/get-test.js";
|
|
8
|
-
export default
|
|
8
|
+
export default config => {
|
|
9
9
|
var _coverageSteps;
|
|
10
10
|
return {
|
|
11
11
|
'cancel-existing': {
|
|
@@ -84,4 +84,4 @@ export default (config => {
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
};
|
|
87
|
-
}
|
|
87
|
+
};
|
|
@@ -4,7 +4,7 @@ import checkUnknownFilesSteps from "../steps/check-unknown-files.js";
|
|
|
4
4
|
import coverageSteps from "../steps/coverage.js";
|
|
5
5
|
import getReleaseSteps from "../steps/get-release.js";
|
|
6
6
|
import getTestSteps from "../steps/get-test.js";
|
|
7
|
-
export default
|
|
7
|
+
export default config => ({
|
|
8
8
|
build: {
|
|
9
9
|
if: "!contains(github.event.head_commit.message, '[skip ci]')",
|
|
10
10
|
'runs-on': 'ubuntu-latest',
|
|
@@ -34,4 +34,4 @@ export default (config => ({
|
|
|
34
34
|
run: 'pnpm install --frozen-lockfile'
|
|
35
35
|
}, ...getTestSteps(), ...coverageSteps, ...checkUnknownFilesSteps, ...getReleaseSteps(config)]
|
|
36
36
|
}
|
|
37
|
-
})
|
|
37
|
+
});
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { identity, sortBy } from '@dword-design/functions';
|
|
2
|
-
import commonGitignore from "../common-gitignore.js";
|
|
3
2
|
export default function () {
|
|
4
3
|
var _ref;
|
|
5
|
-
return _ref = [...
|
|
4
|
+
return _ref = ['.DS_Store', '/.env.json', '/.test.env.json', '/.nyc_output', '/coverage', '/node_modules', ...(this.config.testRunner === 'playwright' ? ['/test-results'] : []), ...this.config.gitignore], sortBy(identity)(_ref);
|
|
6
5
|
}
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
var _ref;
|
|
7
7
|
return endent`
|
|
8
8
|
<p>
|
|
9
|
-
${
|
|
9
|
+
${_ref = [...(this.config.npmPublish && !this.packageConfig.private ? [endent`
|
|
10
10
|
<a href="https://npmjs.org/package/${this.packageConfig.name}">
|
|
11
11
|
<img
|
|
12
12
|
src="https://img.shields.io/npm/v/${this.packageConfig.name}.svg"
|
|
@@ -63,7 +63,7 @@ export default {
|
|
|
63
63
|
width="163"
|
|
64
64
|
>
|
|
65
65
|
</a>
|
|
66
|
-
`], join('')(_ref)
|
|
66
|
+
`], join('')(_ref)}
|
|
67
67
|
</p>
|
|
68
68
|
`;
|
|
69
69
|
},
|
|
@@ -112,13 +112,13 @@ export default {
|
|
|
112
112
|
`, ...(this.config.seeAlso.length > 0 ? [endent`
|
|
113
113
|
## See also
|
|
114
114
|
|
|
115
|
-
${
|
|
115
|
+
${_ref3 = (_this$config$seeAlso = this.config.seeAlso, map(entry => {
|
|
116
116
|
var _entry$repository, _parts;
|
|
117
117
|
const parts = (_entry$repository = entry.repository, split('/')(_entry$repository));
|
|
118
118
|
const owner = parts.length >= 2 ? parts[0] : 'dword-design';
|
|
119
119
|
const name = (_parts = parts, last(_parts));
|
|
120
120
|
return `* [${name}](https://github.com/${owner}/${name}): ${entry.description}`;
|
|
121
|
-
})(_this$config$seeAlso)), join('\n')(_ref3)
|
|
121
|
+
})(_this$config$seeAlso)), join('\n')(_ref3)}
|
|
122
122
|
`] : []), this.packageConfig.license ? [(() => {
|
|
123
123
|
const parsed = spdxParse(this.packageConfig.license);
|
|
124
124
|
const license = spdxList[parsed.license];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default (
|
|
1
|
+
export default (name, content) => `(^|[^\\w])${name}\`${content}\``;
|
|
@@ -17,19 +17,19 @@ export default function () {
|
|
|
17
17
|
var _commitlintConfig, _commitizenConfig, _this$getGithubCodesp, _this$getEslintConfig, _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
|
-
'.commitlintrc.json': `${
|
|
20
|
+
'.commitlintrc.json': `${_commitlintConfig = commitlintConfig, jsonToString({
|
|
21
21
|
indent: 2
|
|
22
|
-
})(_commitlintConfig)
|
|
23
|
-
'.cz.json': `${
|
|
22
|
+
})(_commitlintConfig)}\n`,
|
|
23
|
+
'.cz.json': `${_commitizenConfig = commitizenConfig, jsonToString({
|
|
24
24
|
indent: 2
|
|
25
|
-
})(_commitizenConfig)
|
|
26
|
-
'.devcontainer/devcontainer.json': `${
|
|
25
|
+
})(_commitizenConfig)}\n`,
|
|
26
|
+
'.devcontainer/devcontainer.json': `${_this$getGithubCodesp = this.getGithubCodespacesConfig(), jsonToString({
|
|
27
27
|
indent: 2
|
|
28
|
-
})(_this$getGithubCodesp)
|
|
28
|
+
})(_this$getGithubCodesp)}\n`,
|
|
29
29
|
'.editorconfig': editorconfigConfig,
|
|
30
|
-
'.eslintrc.json': `${
|
|
30
|
+
'.eslintrc.json': `${_this$getEslintConfig = this.getEslintConfig(), jsonToString({
|
|
31
31
|
indent: 2
|
|
32
|
-
})(_this$getEslintConfig)
|
|
32
|
+
})(_this$getEslintConfig)}\n`,
|
|
33
33
|
'.gitattributes': gitattributesConfig,
|
|
34
34
|
'.github/DEPRECATED_DEPENDENCIES_ISSUE_TEMPLATE.md': deprecatedDependenciesIssueTemplate,
|
|
35
35
|
'.github/FUNDING.yml': (_githubFunding = githubFunding, yaml.stringify(_githubFunding)),
|
|
@@ -52,24 +52,24 @@ export default function () {
|
|
|
52
52
|
'.gitpod.Dockerfile': this.getGitpodDockerfile(),
|
|
53
53
|
'.gitpod.yml': (_this$getGitpodConfig = this.getGitpodConfig(), yaml.stringify(_this$getGitpodConfig)),
|
|
54
54
|
'.npmrc': `${npmrc}\n`,
|
|
55
|
-
'.releaserc.json': `${
|
|
55
|
+
'.releaserc.json': `${_this$getReleaseConfi = this.getReleaseConfig(), jsonToString({
|
|
56
56
|
indent: 2
|
|
57
|
-
})(_this$getReleaseConfi)
|
|
58
|
-
'.renovaterc.json': `${
|
|
57
|
+
})(_this$getReleaseConfi)}\n`,
|
|
58
|
+
'.renovaterc.json': `${_sortKeys6 = sortKeys(this.getRenovateConfig(), {
|
|
59
59
|
deep: true
|
|
60
60
|
}), jsonToString({
|
|
61
61
|
indent: 2
|
|
62
|
-
})(_sortKeys6)
|
|
63
|
-
'.vscode/settings.json': `${
|
|
62
|
+
})(_sortKeys6)}\n`,
|
|
63
|
+
'.vscode/settings.json': `${_this$getVscodeConfig = this.getVscodeConfig(), jsonToString({
|
|
64
64
|
indent: 2
|
|
65
|
-
})(_this$getVscodeConfig)
|
|
65
|
+
})(_this$getVscodeConfig)}\n`,
|
|
66
66
|
'LICENSE.md': this.getLicenseString(),
|
|
67
67
|
'README.md': this.getReadmeString(),
|
|
68
|
-
'babel.config.json': `${
|
|
68
|
+
'babel.config.json': `${_babelConfig = babelConfig, jsonToString({
|
|
69
69
|
indent: 2
|
|
70
|
-
})(_babelConfig)
|
|
71
|
-
'package.json': `${
|
|
70
|
+
})(_babelConfig)}\n`,
|
|
71
|
+
'package.json': `${_ref2 = (_packageConfig = packageConfig, sortPackageJson(_packageConfig)), jsonToString({
|
|
72
72
|
indent: 2
|
|
73
|
-
})(_ref2)
|
|
73
|
+
})(_ref2)}\n`
|
|
74
74
|
};
|
|
75
75
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from 'fs-extra';
|
|
2
2
|
import hostedGitInfo from 'hosted-git-info';
|
|
3
3
|
import parseGitConfig from 'parse-git-config';
|
|
4
|
-
export default (
|
|
4
|
+
export default () => {
|
|
5
5
|
if (!fs.existsSync('.git')) {
|
|
6
6
|
return undefined;
|
|
7
7
|
}
|
|
@@ -14,4 +14,4 @@ export default (() => {
|
|
|
14
14
|
throw new Error('Only GitHub repositories are supported.');
|
|
15
15
|
}
|
|
16
16
|
return gitInfo;
|
|
17
|
-
}
|
|
17
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { property } from '@dword-design/functions';
|
|
2
2
|
import { cosmiconfig } from 'cosmiconfig';
|
|
3
|
-
export default
|
|
3
|
+
export default async () => {
|
|
4
4
|
var _ref, _explorer$search;
|
|
5
5
|
const explorer = cosmiconfig('base', {
|
|
6
6
|
packageProp: 'baseConfig'
|
|
@@ -12,4 +12,4 @@ export default (async () => {
|
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
14
|
return config;
|
|
15
|
-
}
|
|
15
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dword-design/base",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.3.1",
|
|
4
4
|
"description": "Base package for projects.",
|
|
5
5
|
"repository": "dword-design/base",
|
|
6
6
|
"funding": "https://github.com/sponsors/dword-design",
|
|
@@ -24,76 +24,77 @@
|
|
|
24
24
|
"test": "rimraf dist && babel --config-file @dword-design/babel-config --copy-files --no-copy-ignored --out-dir dist --ignore \"**/*.spec.js\" src && node dist/cli.js test"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@commitlint/cli": "^18.
|
|
28
|
-
"@commitlint/config-conventional": "^18.
|
|
29
|
-
"@dword-design/babel-config": "^4.
|
|
27
|
+
"@commitlint/cli": "^18.6.1",
|
|
28
|
+
"@commitlint/config-conventional": "^18.6.3",
|
|
29
|
+
"@dword-design/babel-config": "^4.2.1",
|
|
30
30
|
"@dword-design/base-config-node": "^3.0.0",
|
|
31
|
-
"@dword-design/ci": "^4.0.
|
|
32
|
-
"@dword-design/eslint-config": "^5.0.
|
|
33
|
-
"@dword-design/functions": "^6.0.
|
|
31
|
+
"@dword-design/ci": "^4.0.6",
|
|
32
|
+
"@dword-design/eslint-config": "^5.0.20",
|
|
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",
|
|
36
|
-
"@dword-design/pretest": "^1.0.
|
|
36
|
+
"@dword-design/pretest": "^1.0.15",
|
|
37
37
|
"@dword-design/setup-test": "^1.0.2",
|
|
38
|
-
"@dword-design/suppress-babel-register-esm-warning": "^1.1.
|
|
38
|
+
"@dword-design/suppress-babel-register-esm-warning": "^1.1.10",
|
|
39
39
|
"@semantic-release/changelog": "^6.0.3",
|
|
40
40
|
"@semantic-release/git": "^10.0.1",
|
|
41
|
-
"ajv": "^8.
|
|
42
|
-
"babel-register-esm": "npm:@dword-design/babel-register-esm@^2",
|
|
43
|
-
"c8": "^9.
|
|
44
|
-
"change-case": "^5.
|
|
45
|
-
"commitizen": "^4.
|
|
41
|
+
"ajv": "^8.17.1",
|
|
42
|
+
"babel-register-esm": "npm:@dword-design/babel-register-esm@^2.0.3",
|
|
43
|
+
"c8": "^9.1.0",
|
|
44
|
+
"change-case": "^5.4.4",
|
|
45
|
+
"commitizen": "^4.3.1",
|
|
46
46
|
"cosmiconfig": "^9.0.0",
|
|
47
|
-
"cz-conventional-changelog": "^3.
|
|
48
|
-
"deepmerge": "^4.
|
|
49
|
-
"depcheck": "npm:@dword-design/depcheck@^0",
|
|
50
|
-
"depcheck-detector-bin-name": "^1.0.
|
|
47
|
+
"cz-conventional-changelog": "^3.3.0",
|
|
48
|
+
"deepmerge": "^4.3.1",
|
|
49
|
+
"depcheck": "npm:@dword-design/depcheck@^0.0.7",
|
|
50
|
+
"depcheck-detector-bin-name": "^1.0.2",
|
|
51
51
|
"depcheck-detector-execa": "^4.0.0",
|
|
52
|
-
"depcheck-detector-package-name": "^3.0.
|
|
53
|
-
"depcheck-package-name": "^3.0.
|
|
54
|
-
"depcheck-parser-babel": "^3.0.
|
|
55
|
-
"eslint": "^8.
|
|
56
|
-
"execa": "^9.
|
|
52
|
+
"depcheck-detector-package-name": "^3.0.4",
|
|
53
|
+
"depcheck-package-name": "^3.0.1",
|
|
54
|
+
"depcheck-parser-babel": "^3.0.57",
|
|
55
|
+
"eslint": "^8.57.1",
|
|
56
|
+
"execa": "^9.5.2",
|
|
57
57
|
"find-up": "^7.0.0",
|
|
58
|
-
"fs-extra": "^11.
|
|
59
|
-
"get-projectz-readme-section-regex": "^3.0.
|
|
60
|
-
"globby": "^14.
|
|
61
|
-
"hosted-git-info": "^7.0.
|
|
58
|
+
"fs-extra": "^11.3.0",
|
|
59
|
+
"get-projectz-readme-section-regex": "^3.0.10",
|
|
60
|
+
"globby": "^14.1.0",
|
|
61
|
+
"hosted-git-info": "^7.0.2",
|
|
62
62
|
"husky": "^8.0.3",
|
|
63
|
-
"ignore": "^5.
|
|
64
|
-
"is-ci": "^3.0.
|
|
65
|
-
"jiti": "^1.
|
|
63
|
+
"ignore": "^5.3.2",
|
|
64
|
+
"is-ci": "^3.0.1",
|
|
65
|
+
"jiti": "^1.21.7",
|
|
66
66
|
"make-cli": "^4.0.0",
|
|
67
|
-
"mocha": "^10.2
|
|
68
|
-
"mocha-spec-reporter-with-file-names": "npm:@dword-design/mocha-spec-reporter-with-file-names@^0",
|
|
67
|
+
"mocha": "^10.8.2",
|
|
68
|
+
"mocha-spec-reporter-with-file-names": "npm:@dword-design/mocha-spec-reporter-with-file-names@^0.0.1",
|
|
69
69
|
"mocha-ui-exports-auto-describe": "^3.0.0",
|
|
70
|
-
"nyc": "^15.
|
|
71
|
-
"output-files": "^2.0.
|
|
70
|
+
"nyc": "^15.1.0",
|
|
71
|
+
"output-files": "^2.0.32",
|
|
72
72
|
"package-name-regex": "^4.0.0",
|
|
73
73
|
"parse-git-config": "^3.0.0",
|
|
74
74
|
"parse-packagejson-name": "^1.0.1",
|
|
75
|
-
"plugin-name-to-package-name": "npm:@dword-design/plugin-name-to-package-name@^0",
|
|
75
|
+
"plugin-name-to-package-name": "npm:@dword-design/plugin-name-to-package-name@^0.1.2",
|
|
76
76
|
"safe-readfile": "^1.0.2",
|
|
77
77
|
"semantic-release": "^22.0.12",
|
|
78
|
-
"sort-keys": "^5.
|
|
79
|
-
"sort-package-json": "^2.1
|
|
78
|
+
"sort-keys": "^5.1.0",
|
|
79
|
+
"sort-package-json": "^2.15.1",
|
|
80
80
|
"spdx-expression-parse": "^4.0.0",
|
|
81
|
-
"spdx-license-list": "^6.
|
|
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.7.1"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
|
-
"@babel/cli": "^7.
|
|
88
|
-
"@dword-design/chdir": "^3.0.
|
|
87
|
+
"@babel/cli": "^7.27.1",
|
|
88
|
+
"@dword-design/chdir": "^3.0.2",
|
|
89
89
|
"@dword-design/dotenv-json-extended": "^2.0.25",
|
|
90
|
-
"@dword-design/tester": "^2.0.
|
|
91
|
-
"@dword-design/tester-plugin-tmp-dir": "^2.
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
90
|
+
"@dword-design/tester": "^2.0.19",
|
|
91
|
+
"@dword-design/tester-plugin-tmp-dir": "^2.1.26",
|
|
92
|
+
"@playwright/test": "^1.52.0",
|
|
93
|
+
"p-event": "^6.0.1",
|
|
94
|
+
"renovate": "^39.264.0",
|
|
95
|
+
"rimraf": "^5.0.10",
|
|
96
|
+
"sharp": "^0.34.1",
|
|
97
|
+
"unify-mocha-output": "^2.0.22"
|
|
97
98
|
},
|
|
98
99
|
"packageManager": "pnpm@10.10.0+sha512.d615db246fe70f25dcfea6d8d73dee782ce23e2245e3c4f6f888249fb568149318637dca73c2c5c8ef2a4ca0d5657fb9567188bfab47f566d1ee6ce987815c39",
|
|
99
100
|
"engines": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default ['.DS_Store', '/.env.json', '/.test.env.json', '/.nyc_output', '/coverage', '/node_modules'];
|