@dword-design/base 12.2.1 → 13.0.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.
Files changed (50) hide show
  1. package/README.md +68 -68
  2. package/dist/cli.js +6 -7
  3. package/dist/commands/check-unknown-files/index.js +9 -13
  4. package/dist/commands/check-unknown-files/unknown-files-error.js +3 -3
  5. package/dist/commands/commit/index.js +2 -2
  6. package/dist/commands/depcheck/index.js +16 -16
  7. package/dist/commands/prepare/index.js +3 -5
  8. package/dist/commands/test-docker/index.js +5 -11
  9. package/dist/commands/test-raw/index.js +5 -18
  10. package/dist/get-depcheck-special-base/index.js +2 -5
  11. package/dist/get-generated-files/babel.js +5 -1
  12. package/dist/get-generated-files/common-editor-ignore.js +1 -1
  13. package/dist/get-generated-files/editorconfig.js +1 -1
  14. package/dist/get-generated-files/get-editor-ignore/index.js +2 -3
  15. package/dist/get-generated-files/get-eslint/index.js +3 -3
  16. package/dist/get-generated-files/get-github-workflow/steps/get-release.js +3 -5
  17. package/dist/get-generated-files/get-github-workflow/steps/get-test.js +3 -11
  18. package/dist/get-generated-files/get-github-workflow/strategies/job-matrix.js +2 -4
  19. package/dist/get-generated-files/get-gitignore/index.js +2 -3
  20. package/dist/get-generated-files/get-gitpod/index.js +1 -1
  21. package/dist/get-generated-files/get-gitpod-dockerfile.js +1 -1
  22. package/dist/get-generated-files/get-license-string.js +1 -1
  23. package/dist/get-generated-files/get-package-config/index.js +5 -7
  24. package/dist/get-generated-files/get-readme-string/index.js +13 -13
  25. package/dist/get-generated-files/get-readme-string/replacements.js +97 -99
  26. package/dist/get-generated-files/get-renovate/index.js +2 -2
  27. package/dist/get-generated-files/get-vscode/index.js +1 -3
  28. package/dist/get-generated-files/gitattributes.js +1 -1
  29. package/dist/get-generated-files/github-deprecated-dependencies-issue-template.js +1 -1
  30. package/dist/get-generated-files/github-labels.js +6 -10
  31. package/dist/get-generated-files/index.js +25 -43
  32. package/dist/get-generated-files/typescript.js +15 -0
  33. package/dist/index.js +85 -43
  34. package/dist/load-config/index.js +4 -2
  35. package/dist/load-config-sync/index.js +4 -2
  36. package/package.json +18 -30
  37. package/dist/__snapshots__/index.spec.js.snap +0 -84
  38. package/dist/commands/prepare/__snapshots__/index.spec.js.snap +0 -143
  39. package/dist/commands/test-raw/__snapshots__/index.spec.js.snap +0 -53
  40. package/dist/get-generated-files/__snapshots__/index.spec.js.snap +0 -57
  41. package/dist/get-generated-files/get-editor-ignore/__snapshots__/index.spec.js.snap +0 -29
  42. package/dist/get-generated-files/get-github-sync-metadata/__snapshots__/index.spec.js.snap +0 -72
  43. package/dist/get-generated-files/get-github-workflow/__snapshots__/index.spec.js.snap +0 -1133
  44. package/dist/get-generated-files/get-gitignore/__snapshots__/index.spec.js.snap +0 -13
  45. package/dist/get-generated-files/get-gitpod/__snapshots__/index.spec.js.snap +0 -32
  46. package/dist/get-generated-files/get-package-config/__snapshots__/index.spec.js.snap +0 -116
  47. package/dist/get-generated-files/get-readme-string/__snapshots__/index.spec.js.snap +0 -236
  48. package/dist/get-generated-files/get-vscode/__snapshots__/index.spec.js.snap +0 -35
  49. package/dist/get-generated-files/github-deprecated-dependencies/__snapshots__/index.spec.js.snap +0 -57
  50. package/dist/get-generated-files/typescript/index.js +0 -11
package/dist/index.js CHANGED
@@ -1,15 +1,14 @@
1
1
  import pathLib from 'node:path';
2
- import { endent, identity, mapValues } from '@dword-design/functions';
3
- import jitiBabelTransform from '@dword-design/jiti-babel-transform';
4
2
  import deepmerge from 'deepmerge';
5
3
  import depcheck from 'depcheck';
6
4
  import depcheckDetectorBinName from 'depcheck-detector-bin-name';
7
5
  import depcheckDetectorExeca from 'depcheck-detector-execa';
8
6
  import depcheckDetectorPackageName from 'depcheck-detector-package-name';
9
7
  import packageName from 'depcheck-package-name';
10
- import depcheckParserBabel from 'depcheck-parser-babel';
8
+ import endent from 'endent';
11
9
  import fs from 'fs-extra';
12
- import jiti from 'jiti';
10
+ import { createJiti } from 'jiti';
11
+ import { identity, mapValues } from 'lodash-es';
13
12
  import { transform as pluginNameToPackageName } from 'plugin-name-to-package-name';
14
13
  import checkUnknownFiles from "./commands/check-unknown-files/index.js";
15
14
  import commit from "./commands/commit/index.js";
@@ -20,6 +19,7 @@ import test from "./commands/test/index.js";
20
19
  import testDocker from "./commands/test-docker/index.js";
21
20
  import testRaw from "./commands/test-raw/index.js";
22
21
  import getDepcheckSpecialBase from "./get-depcheck-special-base/index.js";
22
+ import getGeneratedFiles from "./get-generated-files/index.js";
23
23
  import getEditorIgnoreConfig from "./get-generated-files/get-editor-ignore/index.js";
24
24
  import getEslintConfig from "./get-generated-files/get-eslint/index.js";
25
25
  import getGithubSyncMetadataConfig from "./get-generated-files/get-github-sync-metadata/index.js";
@@ -34,7 +34,6 @@ import getReleaseConfig from "./get-generated-files/get-release/index.js";
34
34
  import getRenovateConfig from "./get-generated-files/get-renovate/index.js";
35
35
  import getVscodeConfig from "./get-generated-files/get-vscode/index.js";
36
36
  import githubCodespacesConfig from "./get-generated-files/github-codespaces.js";
37
- import getGeneratedFiles from "./get-generated-files/index.js";
38
37
  import getGitInfo from "./get-git-info/index.js";
39
38
  const mergeConfigs = (...configs) => {
40
39
  const result = deepmerge.all(configs, {
@@ -43,16 +42,82 @@ const mergeConfigs = (...configs) => {
43
42
  return result;
44
43
  };
45
44
  class Base {
45
+ config;
46
+ packageConfig;
47
+ cwd;
48
+ generatedFiles;
49
+ githubCodespacesConfig = githubCodespacesConfig;
50
+ commit(...args) {
51
+ return commit.call(this, ...args);
52
+ }
53
+ lint(...args) {
54
+ return lint.call(this, ...args);
55
+ }
56
+ prepare(...args) {
57
+ return prepare.call(this, ...args);
58
+ }
59
+ test(...args) {
60
+ return test.call(this, ...args);
61
+ }
62
+ testRaw(...args) {
63
+ return testRaw.call(this, ...args);
64
+ }
65
+ testDocker(...args) {
66
+ return testDocker.call(this, ...args);
67
+ }
68
+ getPackageConfig(...args) {
69
+ return getPackageConfig.call(this, ...args);
70
+ }
71
+ getGeneratedFiles(...args) {
72
+ return getGeneratedFiles.call(this, ...args);
73
+ }
74
+ checkUnknownFiles(...args) {
75
+ return checkUnknownFiles.call(this, ...args);
76
+ }
77
+ depcheck(...args) {
78
+ return depcheckMethod.call(this, ...args);
79
+ }
80
+ getEditorIgnoreConfig(...args) {
81
+ return getEditorIgnoreConfig.call(this, ...args);
82
+ }
83
+ getEslintConfig(...args) {
84
+ return getEslintConfig.call(this, ...args);
85
+ }
86
+ getGithubSyncMetadataConfig(...args) {
87
+ return getGithubSyncMetadataConfig.call(this, ...args);
88
+ }
89
+ getGithubWorkflowConfig(...args) {
90
+ return getGithubWorkflowConfig.call(this, ...args);
91
+ }
92
+ getGitignoreConfig(...args) {
93
+ return getGitignoreConfig.call(this, ...args);
94
+ }
95
+ getGitpodConfig(...args) {
96
+ return getGitpodConfig.call(this, ...args);
97
+ }
98
+ getGitpodDockerfile(...args) {
99
+ return getGitpodDockerfile.call(this, ...args);
100
+ }
101
+ getLicenseString(...args) {
102
+ return getLicenseString.call(this, ...args);
103
+ }
104
+ getReadmeString(...args) {
105
+ return getReadmeString.call(this, ...args);
106
+ }
107
+ getReleaseConfig(...args) {
108
+ return getReleaseConfig.call(this, ...args);
109
+ }
110
+ getRenovateConfig(...args) {
111
+ return getRenovateConfig.call(this, ...args);
112
+ }
113
+ getVscodeConfig(...args) {
114
+ return getVscodeConfig.call(this, ...args);
115
+ }
46
116
  constructor(config = null, {
47
117
  cwd = '.'
48
118
  } = {}) {
49
- var _this$config$commands;
50
119
  this.cwd = cwd;
51
- const jitiInstance = jiti(pathLib.resolve(this.cwd), {
52
- esmResolve: true,
53
- interopDefault: true,
54
- transform: jitiBabelTransform
55
- });
120
+ const jitiInstance = createJiti(pathLib.resolve(this.cwd));
56
121
  if (config === null) {
57
122
  config = {
58
123
  name: packageName`@dword-design/base-config-node`
@@ -72,7 +137,7 @@ class Base {
72
137
  detectors: [depcheck.detector.importDeclaration, depcheck.detector.requireCallExpression, depcheck.detector.requireResolveCallExpression, depcheckDetectorExeca, depcheckDetectorPackageName, depcheckDetectorBinName],
73
138
  ignorePath: '.gitignore',
74
139
  parsers: {
75
- '**/*.js': depcheckParserBabel
140
+ '**/*.ts': depcheck.parser.typescript
76
141
  },
77
142
  specials: [getDepcheckSpecialBase(config.name), depcheck.special.bin]
78
143
  },
@@ -105,13 +170,15 @@ class Base {
105
170
  seeAlso: [],
106
171
  supportedNodeVersions: [18, 20],
107
172
  syncKeywords: true,
108
- testRunner: 'mocha',
109
173
  windows: true
110
174
  };
111
175
  const configsToMerge = [defaultConfig];
112
176
  if (config.name) {
113
- const inheritedConfigPath = config.name === this.packageConfig.name ? pathLib.resolve(this.cwd, 'src', 'index.js') : config.name;
177
+ const inheritedConfigPath = config.name === this.packageConfig.name ? pathLib.resolve(this.cwd, 'src', 'index.ts') : config.name;
114
178
  let inheritedConfig = inheritedConfigPath ? jitiInstance(inheritedConfigPath) : undefined;
179
+ if (inheritedConfig?.default) {
180
+ inheritedConfig = inheritedConfig.default;
181
+ }
115
182
  if (typeof inheritedConfig === 'function') {
116
183
  inheritedConfig = inheritedConfig.call(this, mergeConfigs(defaultConfig, config));
117
184
  }
@@ -121,9 +188,9 @@ class Base {
121
188
  this.config = mergeConfigs(...configsToMerge);
122
189
  this.config = {
123
190
  ...this.config,
124
- commands: (_this$config$commands = this.config.commands, mapValues(command => typeof command === 'function' ? {
191
+ commands: mapValues(this.config.commands, command => typeof command === 'function' ? {
125
192
  handler: command
126
- } : command)(_this$config$commands))
193
+ } : command)
127
194
  };
128
195
  this.packageConfig = this.getPackageConfig();
129
196
  this.generatedFiles = this.getGeneratedFiles();
@@ -132,31 +199,6 @@ class Base {
132
199
  return this.config.commands[name].handler.call(this, ...args);
133
200
  }
134
201
  }
135
- Object.assign(Base.prototype, {
136
- checkUnknownFiles,
137
- commit,
138
- depcheck: depcheckMethod,
139
- getEditorIgnoreConfig,
140
- getEslintConfig,
141
- getGeneratedFiles,
142
- getGithubSyncMetadataConfig,
143
- getGithubWorkflowConfig,
144
- getGitignoreConfig,
145
- getGitpodConfig,
146
- getGitpodDockerfile,
147
- getLicenseString,
148
- getPackageConfig,
149
- getReadmeString,
150
- getReleaseConfig,
151
- getRenovateConfig,
152
- getVscodeConfig,
153
- githubCodespacesConfig,
154
- lint,
155
- prepare,
156
- test,
157
- testDocker,
158
- testRaw
159
- });
160
- export { Base };
161
202
  export { default as loadConfig } from "./load-config/index.js";
162
- export { default as loadConfigSync } from "./load-config-sync/index.js";
203
+ export { default as loadConfigSync } from "./load-config-sync/index.js";
204
+ export { Base };
@@ -1,9 +1,11 @@
1
1
  import { cosmiconfig } from 'cosmiconfig';
2
- export default async () => {
2
+ export default async ({
3
+ cwd = '.'
4
+ } = {}) => {
3
5
  const explorer = cosmiconfig('base', {
4
6
  packageProp: 'baseConfig'
5
7
  });
6
- const result = await explorer.search();
8
+ const result = await explorer.search(cwd);
7
9
  let config = result?.config ?? null;
8
10
  if (typeof config === 'string') {
9
11
  config = {
@@ -1,9 +1,11 @@
1
1
  import { cosmiconfigSync } from 'cosmiconfig';
2
- export default () => {
2
+ export default ({
3
+ cwd = '.'
4
+ } = {}) => {
3
5
  const explorer = cosmiconfigSync('base', {
4
6
  packageProp: 'baseConfig'
5
7
  });
6
- let config = explorer.search()?.config ?? null;
8
+ let config = explorer.search(cwd)?.config ?? null;
7
9
  if (typeof config === 'string') {
8
10
  config = {
9
11
  name: config
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dword-design/base",
3
- "version": "12.2.1",
3
+ "version": "13.0.1",
4
4
  "description": "Base package for projects.",
5
5
  "repository": "dword-design/base",
6
6
  "funding": "https://github.com/sponsors/dword-design",
@@ -14,32 +14,27 @@
14
14
  "dist"
15
15
  ],
16
16
  "scripts": {
17
- "checkUnknownFiles": "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 checkUnknownFiles",
18
- "commit": "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 commit",
19
- "depcheck": "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 depcheck",
20
- "dev": "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 dev",
21
- "lint": "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 lint",
22
- "prepare": "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 prepare",
23
- "prepublishOnly": "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 prepublishOnly",
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"
17
+ "checkUnknownFiles": "rimraf dist && tsc && babel dist --out-dir dist && node dist/cli.js checkUnknownFiles",
18
+ "commit": "rimraf dist && tsc && babel dist --out-dir dist && node dist/cli.js commit",
19
+ "depcheck": "rimraf dist && tsc && babel dist --out-dir dist && node dist/cli.js depcheck",
20
+ "dev": "rimraf dist && tsc && babel dist --out-dir dist && node dist/cli.js dev",
21
+ "lint": "rimraf dist && tsc && babel dist --out-dir dist && node dist/cli.js lint",
22
+ "prepare": "rimraf dist && tsc && babel dist --out-dir dist && node dist/cli.js prepare",
23
+ "prepublishOnly": "rimraf dist && tsc && babel dist --out-dir dist && node dist/cli.js prepublishOnly",
24
+ "test": "rimraf dist && tsc && babel dist --out-dir dist && node dist/cli.js test"
25
25
  },
26
26
  "dependencies": {
27
27
  "@commitlint/cli": "^18.6.1",
28
28
  "@commitlint/config-conventional": "^18.6.3",
29
- "@dword-design/babel-config": "^4.2.1",
30
29
  "@dword-design/base-config-node": "^3.0.3",
31
30
  "@dword-design/ci": "^4.0.6",
32
- "@dword-design/eslint-config": "^6.0.1",
33
- "@dword-design/functions": "^6.0.2",
34
- "@dword-design/jiti-babel-transform": "^2.0.0",
31
+ "@dword-design/eslint-config": "^6.1.3",
35
32
  "@dword-design/personal-data": "^2.0.3",
36
- "@dword-design/pretest": "^1.0.15",
37
- "@dword-design/setup-test": "^1.0.2",
38
- "@dword-design/suppress-babel-register-esm-warning": "^1.1.10",
39
33
  "@semantic-release/changelog": "^6.0.3",
40
34
  "@semantic-release/git": "^10.0.1",
41
35
  "ajv": "^8.17.1",
42
- "babel-register-esm": "npm:@dword-design/babel-register-esm@^2.0.3",
36
+ "babel-plugin-add-import-extension": "^1.6.0",
37
+ "babel-plugin-module-resolver": "^5.0.2",
43
38
  "c8": "^9.1.0",
44
39
  "change-case": "^5.4.4",
45
40
  "commitizen": "^4.3.1",
@@ -51,7 +46,7 @@
51
46
  "depcheck-detector-execa": "^4.0.0",
52
47
  "depcheck-detector-package-name": "^3.0.4",
53
48
  "depcheck-package-name": "^3.0.1",
54
- "depcheck-parser-babel": "^3.0.57",
49
+ "endent": "npm:@dword-design/endent@^1.4.1",
55
50
  "eslint": "^9.27.0",
56
51
  "execa": "^9.5.3",
57
52
  "find-up": "^7.0.0",
@@ -62,15 +57,12 @@
62
57
  "husky": "^8.0.3",
63
58
  "ignore": "^5.3.2",
64
59
  "is-ci": "^3.0.1",
65
- "jiti": "^1.21.7",
60
+ "jiti": "^2.4.2",
61
+ "lodash-es": "^4.17.21",
66
62
  "make-cli": "^4.0.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
- "mocha-ui-exports-auto-describe": "^3.0.0",
70
- "nyc": "^15.1.0",
71
63
  "output-files": "^2.0.32",
72
64
  "package-name-regex": "^4.0.0",
73
- "parse-git-config": "^3.0.0",
65
+ "parse-git-config": "npm:@dword-design/parse-git-config@^0.0.1",
74
66
  "parse-packagejson-name": "^1.0.1",
75
67
  "plugin-name-to-package-name": "npm:@dword-design/plugin-name-to-package-name@^0.1.2",
76
68
  "safe-readfile": "^1.0.2",
@@ -79,23 +71,19 @@
79
71
  "sort-package-json": "^2.15.1",
80
72
  "spdx-expression-parse": "^4.0.0",
81
73
  "spdx-license-list": "^6.10.0",
82
- "suppress-experimental-warnings": "^2.0.0",
83
74
  "tagged-template-noop": "^2.1.1",
84
75
  "yaml": "^2.8.0"
85
76
  },
86
77
  "devDependencies": {
87
78
  "@babel/cli": "^7.27.2",
88
- "@dword-design/chdir": "^3.0.2",
89
79
  "@dword-design/dotenv-json-extended": "^2.0.25",
90
- "@dword-design/tester": "^2.0.19",
91
- "@dword-design/tester-plugin-tmp-dir": "^2.1.26",
92
80
  "@playwright/test": "^1.52.0",
93
81
  "p-event": "^6.0.1",
94
82
  "renovate": "^39.264.0",
95
83
  "rimraf": "^5.0.10",
96
84
  "sharp": "^0.34.2",
97
- "tsc-alias": "^1.8.16",
98
- "unify-mocha-output": "^2.0.22"
85
+ "strip-ansi": "^7.1.0",
86
+ "uuid": "^11.1.0"
99
87
  },
100
88
  "packageManager": "pnpm@10.10.0+sha512.d615db246fe70f25dcfea6d8d73dee782ce23e2245e3c4f6f888249fb568149318637dca73c2c5c8ef2a4ca0d5657fb9567188bfab47f566d1ee6ce987815c39",
101
89
  "engines": {
@@ -1,84 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`index empty parent 1`] = `
4
- Object {
5
- "allowedMatches": Array [],
6
- "commands": Object {},
7
- "deployAssets": Array [],
8
- "deployEnv": Object {},
9
- "deployPlugins": Array [],
10
- "editorIgnore": Array [],
11
- "fetchGitHistory": false,
12
- "git": undefined,
13
- "gitignore": Array [],
14
- "macos": true,
15
- "minNodeVersion": null,
16
- "name": "base-config-foo",
17
- "nodeVersion": 20,
18
- "preDeploySteps": Array [],
19
- "readmeInstallString": "## Install
20
-
21
- \`\`\`bash
22
- # npm
23
- $ npm install foo
24
-
25
- # Yarn
26
- $ yarn add foo
27
- \`\`\`",
28
- "seeAlso": Array [],
29
- "supportedNodeVersions": Array [
30
- 18,
31
- 20,
32
- ],
33
- "syncKeywords": true,
34
- "testRunner": "mocha",
35
- "windows": true,
36
- }
37
- `;
38
-
39
- exports[`index inherited 1`] = `
40
- Object {
41
- "allowedMatches": Array [],
42
- "deployAssets": Array [
43
- Object {
44
- "label": "Foo",
45
- "path": "foo.js",
46
- },
47
- ],
48
- "deployEnv": Object {
49
- "FOO": "\${{ secrets.FOO }}",
50
- },
51
- "deployPlugins": Array [
52
- "semantic-release-foo",
53
- ],
54
- "editorIgnore": Array [
55
- "foo",
56
- ],
57
- "fetchGitHistory": false,
58
- "git": undefined,
59
- "gitignore": Array [
60
- "foo",
61
- ],
62
- "macos": true,
63
- "minNodeVersion": null,
64
- "name": "base-config-foo",
65
- "nodeVersion": 10,
66
- "packageBaseConfig": Object {
67
- "main": "dist/index.scss",
68
- },
69
- "preDeploySteps": Array [
70
- Object {
71
- "run": "foo",
72
- },
73
- ],
74
- "readmeInstallString": "foo",
75
- "seeAlso": Array [],
76
- "supportedNodeVersions": Array [
77
- 1,
78
- 2,
79
- ],
80
- "syncKeywords": true,
81
- "testRunner": "mocha",
82
- "windows": true,
83
- }
84
- `;
@@ -1,143 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`index valid 1`] = `
4
- Object {
5
- ".commitlintrc.json": true,
6
- ".cz.json": true,
7
- ".devcontainer": true,
8
- ".editorconfig": true,
9
- ".env.json": true,
10
- ".env.schema.json": true,
11
- ".git": true,
12
- ".gitattributes": true,
13
- ".github": true,
14
- ".gitignore": true,
15
- ".gitpod.Dockerfile": true,
16
- ".gitpod.yml": true,
17
- ".husky": true,
18
- ".npmrc": true,
19
- ".releaserc.json": true,
20
- ".renovaterc.json": true,
21
- ".test.env.json": true,
22
- ".vscode": true,
23
- "CHANGELOG.md": true,
24
- "LICENSE.md": true,
25
- "README.md": true,
26
- "babel.config.json": true,
27
- "eslint.config.js": true,
28
- "package.json": true,
29
- "pnpm-lock.yaml": true,
30
- "src": true,
31
- "tsconfig.json": true,
32
- }
33
- `;
34
-
35
- exports[`index valid 2`] = `
36
- "<!-- TITLE/ -->
37
- # foo
38
- <!-- /TITLE -->
39
-
40
- <!-- BADGES/ -->
41
- <p>
42
- <a href=\\"https://npmjs.org/package/foo\\">
43
- <img
44
- src=\\"https://img.shields.io/npm/v/foo.svg\\"
45
- alt=\\"npm version\\"
46
- >
47
- </a><img src=\\"https://img.shields.io/badge/os-linux%20%7C%C2%A0macos%20%7C%C2%A0windows-blue\\" alt=\\"Linux macOS Windows compatible\\"><a href=\\"https://github.com/dword-design/bar/actions\\">
48
- <img
49
- src=\\"https://github.com/dword-design/bar/workflows/build/badge.svg\\"
50
- alt=\\"Build status\\"
51
- >
52
- </a><a href=\\"https://codecov.io/gh/dword-design/bar\\">
53
- <img
54
- src=\\"https://codecov.io/gh/dword-design/bar/branch/master/graph/badge.svg\\"
55
- alt=\\"Coverage status\\"
56
- >
57
- </a><a href=\\"https://david-dm.org/dword-design/bar\\">
58
- <img src=\\"https://img.shields.io/david/dword-design/bar\\" alt=\\"Dependency status\\">
59
- </a><img src=\\"https://img.shields.io/badge/renovate-enabled-brightgreen\\" alt=\\"Renovate enabled\\"><br/><a href=\\"https://gitpod.io/#https://github.com/dword-design/bar\\">
60
- <img
61
- src=\\"https://gitpod.io/button/open-in-gitpod.svg\\"
62
- alt=\\"Open in Gitpod\\"
63
- width=\\"114\\"
64
- >
65
- </a><a href=\\"https://www.buymeacoffee.com/dword\\">
66
- <img
67
- src=\\"https://www.buymeacoffee.com/assets/img/guidelines/download-assets-sm-2.svg\\"
68
- alt=\\"Buy Me a Coffee\\"
69
- width=\\"114\\"
70
- >
71
- </a><a href=\\"https://paypal.me/SebastianLandwehr\\">
72
- <img
73
- src=\\"https://sebastianlandwehr.com/images/paypal.svg\\"
74
- alt=\\"PayPal\\"
75
- width=\\"163\\"
76
- >
77
- </a><a href=\\"https://www.patreon.com/dworddesign\\">
78
- <img
79
- src=\\"https://sebastianlandwehr.com/images/patreon.svg\\"
80
- alt=\\"Patreon\\"
81
- width=\\"163\\"
82
- >
83
- </a>
84
- </p>
85
- <!-- /BADGES -->
86
-
87
- <!-- DESCRIPTION/ -->
88
-
89
- <!-- /DESCRIPTION -->
90
-
91
- <!-- INSTALL/ -->
92
- ## Install
93
-
94
- \`\`\`bash
95
- # npm
96
- $ npm install foo
97
-
98
- # Yarn
99
- $ yarn add foo
100
- \`\`\`
101
- <!-- /INSTALL -->
102
-
103
- <!-- LICENSE/ -->
104
- ## Contribute
105
-
106
- Are you missing something or want to contribute? Feel free to file an [issue](https://github.com/dword-design/bar/issues) or a [pull request](https://github.com/dword-design/bar/pulls)! ⚙️
107
-
108
- ## Support
109
-
110
- Hey, I am Sebastian Landwehr, a freelance web developer, and I love developing web apps and open source packages. If you want to support me so that I can keep packages up to date and build more helpful tools, you can donate here:
111
-
112
- <p>
113
- <a href=\\"https://www.buymeacoffee.com/dword\\">
114
- <img
115
- src=\\"https://www.buymeacoffee.com/assets/img/guidelines/download-assets-sm-2.svg\\"
116
- alt=\\"Buy Me a Coffee\\"
117
- width=\\"114\\"
118
- >
119
- </a>&nbsp;If you want to send me a one time donation. The coffee is pretty good 😊.<br/>
120
- <a href=\\"https://paypal.me/SebastianLandwehr\\">
121
- <img
122
- src=\\"https://sebastianlandwehr.com/images/paypal.svg\\"
123
- alt=\\"PayPal\\"
124
- width=\\"163\\"
125
- >
126
- </a>&nbsp;Also for one time donations if you like PayPal.<br/>
127
- <a href=\\"https://www.patreon.com/dworddesign\\">
128
- <img
129
- src=\\"https://sebastianlandwehr.com/images/patreon.svg\\"
130
- alt=\\"Patreon\\"
131
- width=\\"163\\"
132
- >
133
- </a>&nbsp;Here you can support me regularly, which is great so I can steadily work on projects.
134
- </p>
135
-
136
- Thanks a lot for your support! ❤️
137
-
138
- ## License
139
-
140
- [MIT License](https://opensource.org/license/mit/) © [Sebastian Landwehr](https://sebastianlandwehr.com)
141
- <!-- /LICENSE -->
142
- "
143
- `;
@@ -1,53 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`index coverage file extension 1`] = `
4
- "
5
- 0 passing
6
-
7
- -----------|---------|----------|---------|---------|-------------------
8
- File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
9
- -----------|---------|----------|---------|---------|-------------------
10
- All files | 100 | 100 | 100 | 100 |
11
- index.foo | 100 | 100 | 100 | 100 |
12
- -----------|---------|----------|---------|---------|-------------------"
13
- `;
14
-
15
- exports[`index global setup 1`] = `
16
- "2
17
-
18
- src/index1.spec.js
19
- index1
20
- ✓ valid
21
-
22
- src/index2.spec.js
23
- index2
24
- ✓ valid
25
-
26
- 2 passing
27
-
28
- ----------------------|---------|----------|---------|---------|-------------------
29
- File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
30
- ----------------------|---------|----------|---------|---------|-------------------
31
- All files | 100 | 100 | 100 | 100 |
32
- global-test-hooks.js | 100 | 100 | 100 | 100 |
33
- ----------------------|---------|----------|---------|---------|-------------------"
34
- `;
35
-
36
- exports[`index multiple patterns 1`] = `
37
- "
38
- src/index1.spec.js
39
- index1
40
- ✓ valid
41
-
42
- src/index2.spec.js
43
- index2
44
- ✓ valid
45
-
46
- 2 passing
47
-
48
- ----------|---------|----------|---------|---------|-------------------
49
- File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
50
- ----------|---------|----------|---------|---------|-------------------
51
- All files | 0 | 0 | 0 | 0 |
52
- ----------|---------|----------|---------|---------|-------------------"
53
- `;
@@ -1,57 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`index no metadata sync 1`] = `
4
- Array [
5
- "babel.config.json",
6
- ".commitlintrc.json",
7
- ".cz.json",
8
- ".editorconfig",
9
- ".gitattributes",
10
- ".github/DEPRECATED_DEPENDENCIES_ISSUE_TEMPLATE.md",
11
- ".github/labels.yml",
12
- ".github/workflows/build.yml",
13
- ".github/workflows/deprecated-dependencies.yml",
14
- ".github/workflows/sync-labels.yml",
15
- ".gitignore",
16
- ".gitpod.Dockerfile",
17
- ".gitpod.yml",
18
- ".huskyrc.json",
19
- ".releaserc.json",
20
- ".renovaterc.json",
21
- ".vscode/settings.json",
22
- "LICENSE.md",
23
- "README.md",
24
- "eslint.config.js",
25
- "package.json",
26
- ]
27
- `;
28
-
29
- exports[`index works 1`] = `
30
- Array [
31
- ".commitlintrc.json",
32
- ".cz.json",
33
- ".devcontainer/devcontainer.json",
34
- ".editorconfig",
35
- ".gitattributes",
36
- ".github/DEPRECATED_DEPENDENCIES_ISSUE_TEMPLATE.md",
37
- ".github/FUNDING.yml",
38
- ".github/labels.yml",
39
- ".github/workflows/build.yml",
40
- ".github/workflows/deprecated-dependencies.yml",
41
- ".github/workflows/sync-labels.yml",
42
- ".github/workflows/sync-metadata.yml",
43
- ".gitignore",
44
- ".gitpod.Dockerfile",
45
- ".gitpod.yml",
46
- ".npmrc",
47
- ".releaserc.json",
48
- ".renovaterc.json",
49
- ".vscode/settings.json",
50
- "LICENSE.md",
51
- "README.md",
52
- "babel.config.json",
53
- "eslint.config.js",
54
- "package.json",
55
- "tsconfig.json",
56
- ]
57
- `;