@dword-design/base 11.1.2 → 11.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/dist/commands/prepare/__snapshots__/index.spec.js.snap +1 -0
- package/dist/commands/test-docker/index.js +1 -1
- package/dist/commands/test-raw/package-json-schema.js +7 -2
- package/dist/get-generated-files/__snapshots__/index.spec.js.snap +2 -0
- package/dist/get-generated-files/common-editor-ignore.js +1 -1
- package/dist/get-generated-files/common-gitignore.js +1 -1
- package/dist/get-generated-files/get-editor-ignore/__snapshots__/index.spec.js.snap +2 -0
- package/dist/get-generated-files/get-github-workflow/__snapshots__/index.spec.js.snap +45 -0
- package/dist/get-generated-files/get-github-workflow/strategies/job-matrix.js +4 -0
- package/dist/get-generated-files/get-github-workflow/strategies/simple.js +2 -0
- package/dist/get-generated-files/get-gitignore/__snapshots__/index.spec.js.snap +1 -0
- package/dist/get-generated-files/get-gitpod/__snapshots__/index.spec.js.snap +5 -2
- package/dist/get-generated-files/get-gitpod/index.js +4 -1
- package/dist/get-generated-files/get-gitpod-dockerfile.js +0 -2
- package/dist/get-generated-files/get-package-config/index.js +1 -0
- package/dist/get-generated-files/get-vscode/__snapshots__/index.spec.js.snap +2 -0
- package/dist/get-generated-files/index.js +3 -1
- package/dist/get-generated-files/yarn.js +3 -0
- package/package.json +6 -7
|
@@ -20,7 +20,7 @@ export default async function (options) {
|
|
|
20
20
|
const userInfo = os.userInfo();
|
|
21
21
|
try {
|
|
22
22
|
var _ref4, _envVariableNames, _ref5;
|
|
23
|
-
return await execa('docker', ['run', '--rm',
|
|
23
|
+
return await execa('docker', ['run', '--rm', ...(_ref4 = (_envVariableNames = envVariableNames, filter(name => process.env[name] !== undefined)(_envVariableNames)), flatMap(name => ['--env', `${name}=${process.env[name]}`])(_ref4)), '-v', `${process.cwd()}:/app`, '-v', `${volumeName}:/app/node_modules`, 'dworddesign/testing:latest', 'bash', '-c', (_ref5 = ['yarn --immutable', '&&', 'yarn test:raw', ...(options.updateSnapshots ? [' --update-snapshots'] : []), ...options.patterns, ...(options.grep ? [`-g "${options.grep}"`] : [])], join(' ')(_ref5))], options.log ? {
|
|
24
24
|
stdio: 'inherit'
|
|
25
25
|
} : {
|
|
26
26
|
all: true
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import packageNameRegex from 'package-name-regex';
|
|
2
|
+
const distPattern = /^\.\/dist\//;
|
|
2
3
|
export default {
|
|
3
4
|
properties: {
|
|
4
5
|
baseConfig: {
|
|
@@ -14,10 +15,11 @@ export default {
|
|
|
14
15
|
},
|
|
15
16
|
bin: {
|
|
16
17
|
additionalProperties: {
|
|
17
|
-
pattern:
|
|
18
|
+
pattern: distPattern.source,
|
|
18
19
|
type: 'string'
|
|
19
20
|
},
|
|
20
|
-
|
|
21
|
+
pattern: distPattern.source,
|
|
22
|
+
type: ['object', 'string']
|
|
21
23
|
},
|
|
22
24
|
dependencies: {
|
|
23
25
|
additionalProperties: {
|
|
@@ -44,6 +46,9 @@ export default {
|
|
|
44
46
|
pattern: packageNameRegex.source,
|
|
45
47
|
type: 'string'
|
|
46
48
|
},
|
|
49
|
+
packageManager: {
|
|
50
|
+
type: 'string'
|
|
51
|
+
},
|
|
47
52
|
version: {
|
|
48
53
|
type: 'string'
|
|
49
54
|
}
|
|
@@ -20,6 +20,7 @@ Array [
|
|
|
20
20
|
".releaserc.json",
|
|
21
21
|
".renovaterc.json",
|
|
22
22
|
".vscode/settings.json",
|
|
23
|
+
".yarnrc.yml",
|
|
23
24
|
"LICENSE.md",
|
|
24
25
|
"README.md",
|
|
25
26
|
"package.json",
|
|
@@ -48,6 +49,7 @@ Array [
|
|
|
48
49
|
".releaserc.json",
|
|
49
50
|
".renovaterc.json",
|
|
50
51
|
".vscode/settings.json",
|
|
52
|
+
".yarnrc.yml",
|
|
51
53
|
"LICENSE.md",
|
|
52
54
|
"README.md",
|
|
53
55
|
"package.json",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default ['.babelrc.json', '.commitlintrc.json', '.cz.json', '.devcontainer', '.editorconfig', '.eslintrc.json', '.gitattributes', '.github', '.gitignore', '.gitpod.Dockerfile', '.gitpod.yml', '.husky', '.nyc_output', '.releaserc.json', '.renovaterc.json', '.vscode', 'CHANGELOG.md', 'coverage', 'LICENSE.md', 'node_modules', 'yarn.lock'];
|
|
1
|
+
export default ['.babelrc.json', '.commitlintrc.json', '.cz.json', '.devcontainer', '.editorconfig', '.eslintrc.json', '.gitattributes', '.github', '.gitignore', '.gitpod.Dockerfile', '.gitpod.yml', '.husky', '.nyc_output', '.releaserc.json', '.renovaterc.json', '.vscode', '.yarn', '.yarnrc.yml', 'CHANGELOG.md', 'coverage', 'LICENSE.md', 'node_modules', 'yarn.lock'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default ['.DS_Store', '/.env.json', '/.test.env.json', '/.nyc_output', '/coverage', '/node_modules'];
|
|
1
|
+
export default ['.DS_Store', '/.env.json', '/.test.env.json', '/.nyc_output', '/.yarn', '/coverage', '/node_modules'];
|
|
@@ -32,6 +32,9 @@ Object {
|
|
|
32
32
|
"node-version": 20,
|
|
33
33
|
},
|
|
34
34
|
},
|
|
35
|
+
Object {
|
|
36
|
+
"run": "corepack enable",
|
|
37
|
+
},
|
|
35
38
|
Object {
|
|
36
39
|
"run": "git config --global user.email \\"actions@github.com\\"",
|
|
37
40
|
},
|
|
@@ -82,6 +85,9 @@ Object {
|
|
|
82
85
|
"node-version": "\${{ matrix.node }}",
|
|
83
86
|
},
|
|
84
87
|
},
|
|
88
|
+
Object {
|
|
89
|
+
"run": "corepack enable",
|
|
90
|
+
},
|
|
85
91
|
Object {
|
|
86
92
|
"run": "yarn --frozen-lockfile",
|
|
87
93
|
},
|
|
@@ -175,6 +181,9 @@ Object {
|
|
|
175
181
|
"node-version": 20,
|
|
176
182
|
},
|
|
177
183
|
},
|
|
184
|
+
Object {
|
|
185
|
+
"run": "corepack enable",
|
|
186
|
+
},
|
|
178
187
|
Object {
|
|
179
188
|
"run": "git config --global user.email \\"actions@github.com\\"",
|
|
180
189
|
},
|
|
@@ -225,6 +234,9 @@ Object {
|
|
|
225
234
|
"node-version": "\${{ matrix.node }}",
|
|
226
235
|
},
|
|
227
236
|
},
|
|
237
|
+
Object {
|
|
238
|
+
"run": "corepack enable",
|
|
239
|
+
},
|
|
228
240
|
Object {
|
|
229
241
|
"run": "yarn --frozen-lockfile",
|
|
230
242
|
},
|
|
@@ -314,6 +326,9 @@ Object {
|
|
|
314
326
|
"node-version": 20,
|
|
315
327
|
},
|
|
316
328
|
},
|
|
329
|
+
Object {
|
|
330
|
+
"run": "corepack enable",
|
|
331
|
+
},
|
|
317
332
|
Object {
|
|
318
333
|
"run": "git config --global user.email \\"actions@github.com\\"",
|
|
319
334
|
},
|
|
@@ -364,6 +379,9 @@ Object {
|
|
|
364
379
|
"node-version": "\${{ matrix.node }}",
|
|
365
380
|
},
|
|
366
381
|
},
|
|
382
|
+
Object {
|
|
383
|
+
"run": "corepack enable",
|
|
384
|
+
},
|
|
367
385
|
Object {
|
|
368
386
|
"run": "yarn --frozen-lockfile",
|
|
369
387
|
},
|
|
@@ -448,6 +466,9 @@ Object {
|
|
|
448
466
|
"node-version": 20,
|
|
449
467
|
},
|
|
450
468
|
},
|
|
469
|
+
Object {
|
|
470
|
+
"run": "corepack enable",
|
|
471
|
+
},
|
|
451
472
|
Object {
|
|
452
473
|
"run": "git config --global user.email \\"actions@github.com\\"",
|
|
453
474
|
},
|
|
@@ -543,6 +564,9 @@ Object {
|
|
|
543
564
|
"node-version": 20,
|
|
544
565
|
},
|
|
545
566
|
},
|
|
567
|
+
Object {
|
|
568
|
+
"run": "corepack enable",
|
|
569
|
+
},
|
|
546
570
|
Object {
|
|
547
571
|
"run": "git config --global user.email \\"actions@github.com\\"",
|
|
548
572
|
},
|
|
@@ -594,6 +618,9 @@ Object {
|
|
|
594
618
|
"node-version": "\${{ matrix.node }}",
|
|
595
619
|
},
|
|
596
620
|
},
|
|
621
|
+
Object {
|
|
622
|
+
"run": "corepack enable",
|
|
623
|
+
},
|
|
597
624
|
Object {
|
|
598
625
|
"run": "yarn --frozen-lockfile",
|
|
599
626
|
},
|
|
@@ -687,6 +714,9 @@ Object {
|
|
|
687
714
|
"node-version": 20,
|
|
688
715
|
},
|
|
689
716
|
},
|
|
717
|
+
Object {
|
|
718
|
+
"run": "corepack enable",
|
|
719
|
+
},
|
|
690
720
|
Object {
|
|
691
721
|
"run": "git config --global user.email \\"actions@github.com\\"",
|
|
692
722
|
},
|
|
@@ -738,6 +768,9 @@ Object {
|
|
|
738
768
|
"node-version": "\${{ matrix.node }}",
|
|
739
769
|
},
|
|
740
770
|
},
|
|
771
|
+
Object {
|
|
772
|
+
"run": "corepack enable",
|
|
773
|
+
},
|
|
741
774
|
Object {
|
|
742
775
|
"run": "yarn --frozen-lockfile",
|
|
743
776
|
},
|
|
@@ -826,6 +859,9 @@ Object {
|
|
|
826
859
|
"ref": "\${{ github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.head.ref || '' }}",
|
|
827
860
|
},
|
|
828
861
|
},
|
|
862
|
+
Object {
|
|
863
|
+
"run": "corepack enable",
|
|
864
|
+
},
|
|
829
865
|
Object {
|
|
830
866
|
"uses": "actions/setup-node@v4",
|
|
831
867
|
"with": Object {
|
|
@@ -877,6 +913,9 @@ Object {
|
|
|
877
913
|
"lfs": true,
|
|
878
914
|
},
|
|
879
915
|
},
|
|
916
|
+
Object {
|
|
917
|
+
"run": "corepack enable",
|
|
918
|
+
},
|
|
880
919
|
Object {
|
|
881
920
|
"uses": "actions/setup-node@v4",
|
|
882
921
|
"with": Object {
|
|
@@ -968,6 +1007,9 @@ Object {
|
|
|
968
1007
|
"node-version": 14,
|
|
969
1008
|
},
|
|
970
1009
|
},
|
|
1010
|
+
Object {
|
|
1011
|
+
"run": "corepack enable",
|
|
1012
|
+
},
|
|
971
1013
|
Object {
|
|
972
1014
|
"run": "git config --global user.email \\"actions@github.com\\"",
|
|
973
1015
|
},
|
|
@@ -1060,6 +1102,9 @@ Object {
|
|
|
1060
1102
|
"node-version": 14,
|
|
1061
1103
|
},
|
|
1062
1104
|
},
|
|
1105
|
+
Object {
|
|
1106
|
+
"run": "corepack enable",
|
|
1107
|
+
},
|
|
1063
1108
|
Object {
|
|
1064
1109
|
"run": "git config --global user.email \\"actions@github.com\\"",
|
|
1065
1110
|
},
|
|
@@ -27,6 +27,8 @@ export default (config => {
|
|
|
27
27
|
with: {
|
|
28
28
|
'node-version': config.nodeVersion
|
|
29
29
|
}
|
|
30
|
+
}, {
|
|
31
|
+
run: 'corepack enable'
|
|
30
32
|
}, {
|
|
31
33
|
run: 'git config --global user.email "actions@github.com"'
|
|
32
34
|
}, {
|
|
@@ -51,6 +53,8 @@ export default (config => {
|
|
|
51
53
|
with: {
|
|
52
54
|
'node-version': '${{ matrix.node }}'
|
|
53
55
|
}
|
|
56
|
+
}, {
|
|
57
|
+
run: 'corepack enable'
|
|
54
58
|
}, {
|
|
55
59
|
run: 'yarn --frozen-lockfile'
|
|
56
60
|
}, ...getTestSteps(), ...(_coverageSteps = coverageSteps, map(step => ({
|
|
@@ -7,9 +7,12 @@ Object {
|
|
|
7
7
|
},
|
|
8
8
|
"tasks": Array [
|
|
9
9
|
Object {
|
|
10
|
-
"before": "echo \\"
|
|
10
|
+
"before": "echo \\"corepack enable\\" >> /home/gitpod/.bashrc
|
|
11
|
+
echo \\"export COREPACK_ENABLE_DOWNLOAD_PROMPT=0\\" >> /home/gitpod/.bashrc
|
|
12
|
+
gitpod-env-per-project >> /home/gitpod/.bashrc
|
|
13
|
+
echo \\"export PUPPETEER_CACHE_DIR=/workspace/foo/node_modules/.cache/puppeteer\\" >> /home/gitpod/.bashrc
|
|
11
14
|
echo \\"export PLAYWRIGHT_BROWSERS_PATH=0\\" >> /home/gitpod/.bashrc
|
|
12
|
-
|
|
15
|
+
source /home/gitpod/.bashrc",
|
|
13
16
|
"init": "git config --global user.name \\"Sebastian Landwehr\\"
|
|
14
17
|
git config diff.lfs.textconv cat
|
|
15
18
|
git lfs pull
|
|
@@ -12,9 +12,12 @@ export default function () {
|
|
|
12
12
|
// after restarts, we need to store it in the workspace folder
|
|
13
13
|
// https://www.gitpod.io/docs/configure/workspaces/workspace-lifecycle#workspace-stopped
|
|
14
14
|
before: endent`
|
|
15
|
+
echo "corepack enable" >> /home/gitpod/.bashrc
|
|
16
|
+
echo "export COREPACK_ENABLE_DOWNLOAD_PROMPT=0" >> /home/gitpod/.bashrc
|
|
17
|
+
gitpod-env-per-project >> /home/gitpod/.bashrc
|
|
15
18
|
echo "export PUPPETEER_CACHE_DIR=/workspace/${packageName}/node_modules/.cache/puppeteer" >> /home/gitpod/.bashrc
|
|
16
19
|
echo "export PLAYWRIGHT_BROWSERS_PATH=0" >> /home/gitpod/.bashrc
|
|
17
|
-
|
|
20
|
+
source /home/gitpod/.bashrc
|
|
18
21
|
`,
|
|
19
22
|
init: endent`
|
|
20
23
|
git config --global user.name "${personalData.name}"
|
|
@@ -13,8 +13,6 @@ export default function () {
|
|
|
13
13
|
RUN bash -c 'source $HOME/.nvm/nvm.sh && nvm install ${this.config.nodeVersion}'
|
|
14
14
|
RUN echo "nvm use default &>/dev/null" >> ~/.bashrc.d/51-nvm-fix
|
|
15
15
|
|
|
16
|
-
RUN echo "\\nexport PATH=$(yarn global bin):\\$PATH" >> /home/gitpod/.bashrc
|
|
17
|
-
|
|
18
16
|
RUN yarn global add gitpod-env-per-project @babel/node @babel/core
|
|
19
17
|
|
|
20
18
|
RUN sudo apt-get install -y graphviz
|
|
@@ -12,8 +12,9 @@ import deprecatedDependenciesIssueTemplate from "./github-deprecated-dependencie
|
|
|
12
12
|
import githubFunding from "./github-funding.js";
|
|
13
13
|
import githubLabelsConfig from "./github-labels.js";
|
|
14
14
|
import githubSyncLabelsConfig from "./github-sync-labels.js";
|
|
15
|
+
import yarn from "./yarn.js";
|
|
15
16
|
export default function () {
|
|
16
|
-
var _babelConfig, _commitlintConfig, _commitizenConfig, _this$getGithubCodesp, _this$getEslintConfig, _githubFunding, _sortKeys, _sortKeys2, _sortKeys3, _sortKeys4, _sortKeys5, _ref, _this$getGitignoreCon, _this$getGitpodConfig, _this$getReleaseConfi, _sortKeys6, _this$getVscodeConfig, _ref2, _packageConfig;
|
|
17
|
+
var _babelConfig, _commitlintConfig, _commitizenConfig, _this$getGithubCodesp, _this$getEslintConfig, _githubFunding, _sortKeys, _sortKeys2, _sortKeys3, _sortKeys4, _sortKeys5, _ref, _this$getGitignoreCon, _this$getGitpodConfig, _this$getReleaseConfi, _sortKeys6, _this$getVscodeConfig, _yarn, _ref2, _packageConfig;
|
|
17
18
|
const packageConfig = this.getPackageConfig();
|
|
18
19
|
return {
|
|
19
20
|
'.babelrc.json': `${(_babelConfig = babelConfig, jsonToString({
|
|
@@ -64,6 +65,7 @@ export default function () {
|
|
|
64
65
|
'.vscode/settings.json': `${(_this$getVscodeConfig = this.getVscodeConfig(), jsonToString({
|
|
65
66
|
indent: 2
|
|
66
67
|
})(_this$getVscodeConfig))}\n`,
|
|
68
|
+
'.yarnrc.yml': (_yarn = yarn, yaml.stringify(_yarn)),
|
|
67
69
|
'LICENSE.md': this.getLicenseString(),
|
|
68
70
|
'README.md': this.getReadmeString(),
|
|
69
71
|
'package.json': `${(_ref2 = (_packageConfig = packageConfig, sortPackageJson(_packageConfig)), jsonToString({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dword-design/base",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.2.0",
|
|
4
4
|
"description": "Base package for projects.",
|
|
5
5
|
"repository": "dword-design/base",
|
|
6
6
|
"funding": "https://github.com/sponsors/dword-design",
|
|
@@ -9,9 +9,7 @@
|
|
|
9
9
|
"type": "module",
|
|
10
10
|
"exports": "./dist/index.js",
|
|
11
11
|
"main": "dist/index.js",
|
|
12
|
-
"bin":
|
|
13
|
-
"base": "./dist/cli.js"
|
|
14
|
-
},
|
|
12
|
+
"bin": "./dist/cli.js",
|
|
15
13
|
"files": [
|
|
16
14
|
"dist"
|
|
17
15
|
],
|
|
@@ -48,7 +46,7 @@
|
|
|
48
46
|
"cosmiconfig": "^9.0.0",
|
|
49
47
|
"cz-conventional-changelog": "^3.1.0",
|
|
50
48
|
"deepmerge": "^4.2.2",
|
|
51
|
-
"depcheck": "npm:@dword-design/depcheck",
|
|
49
|
+
"depcheck": "npm:@dword-design/depcheck@^0",
|
|
52
50
|
"depcheck-detector-bin-name": "^1.0.0",
|
|
53
51
|
"depcheck-detector-execa": "^4.0.0",
|
|
54
52
|
"depcheck-detector-package-name": "^3.0.0",
|
|
@@ -67,14 +65,14 @@
|
|
|
67
65
|
"jiti": "^1.16.0",
|
|
68
66
|
"make-cli": "^4.0.0",
|
|
69
67
|
"mocha": "^10.2.0",
|
|
70
|
-
"mocha-spec-reporter-with-file-names": "npm:@dword-design/mocha-spec-reporter-with-file-names",
|
|
68
|
+
"mocha-spec-reporter-with-file-names": "npm:@dword-design/mocha-spec-reporter-with-file-names@^0",
|
|
71
69
|
"mocha-ui-exports-auto-describe": "^3.0.0",
|
|
72
70
|
"nyc": "^15.0.0",
|
|
73
71
|
"output-files": "^2.0.0",
|
|
74
72
|
"package-name-regex": "^4.0.0",
|
|
75
73
|
"parse-git-config": "^3.0.0",
|
|
76
74
|
"parse-packagejson-name": "^1.0.1",
|
|
77
|
-
"plugin-name-to-package-name": "npm:@dword-design/plugin-name-to-package-name",
|
|
75
|
+
"plugin-name-to-package-name": "npm:@dword-design/plugin-name-to-package-name@^0",
|
|
78
76
|
"safe-readfile": "^1.0.2",
|
|
79
77
|
"semantic-release": "^22.0.12",
|
|
80
78
|
"sort-keys": "^5.0.0",
|
|
@@ -97,6 +95,7 @@
|
|
|
97
95
|
"sharp": "^0.32.1",
|
|
98
96
|
"unify-mocha-output": "^2.0.0"
|
|
99
97
|
},
|
|
98
|
+
"packageManager": "yarn@4.4.0",
|
|
100
99
|
"engines": {
|
|
101
100
|
"node": ">=18"
|
|
102
101
|
},
|