@dword-design/base 9.2.0 → 9.2.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.
@@ -2,7 +2,7 @@ import filter from "@dword-design/functions/dist/filter.js";
2
2
  import fromPairs from "@dword-design/functions/dist/from-pairs.js";
3
3
  import keys from "@dword-design/functions/dist/keys.js";
4
4
  import map from "@dword-design/functions/dist/map.js";
5
- import globby from 'globby';
5
+ import { globby } from 'globby';
6
6
  import ignore from 'ignore';
7
7
  import commonAllowedMatches from "./common-allowed-matches.js";
8
8
  import UnknownFilesError from "./unknown-files-error.js";
@@ -1,4 +1,4 @@
1
- import execa from 'execa';
1
+ import { execa } from 'execa';
2
2
  export default ((options = {}) => execa('git-cz', [...(options.allowEmpty ? ['--allow-empty'] : [])], {
3
3
  stdio: options.log === false ? 'pipe' : 'inherit'
4
4
  }));
@@ -1,4 +1,4 @@
1
- import execa from 'execa';
1
+ import { execa } from 'execa';
2
2
  import { createRequire } from 'module';
3
3
  import parsePackagejsonName from 'parse-packagejson-name';
4
4
  const require = createRequire(import.meta.url);
@@ -1,7 +1,7 @@
1
1
  import first from "@dword-design/functions/dist/first.js";
2
2
  import keys from "@dword-design/functions/dist/keys.js";
3
3
  import packageName from 'depcheck-package-name';
4
- import execa from 'execa';
4
+ import { execa, execaCommand } from 'execa';
5
5
  import fs from 'fs-extra';
6
6
  import { createRequire } from 'module';
7
7
  import outputFiles from 'output-files';
@@ -11,7 +11,7 @@ export default async function () {
11
11
  await outputFiles(this.generatedFiles);
12
12
  if (await fs.exists('.git')) {
13
13
  var _ref, _commitlintPackageCon;
14
- await execa.command('husky install');
14
+ await execaCommand('husky install');
15
15
  await execa('husky', ['set', '.husky/commit-msg', `npx ${(_ref = (_commitlintPackageCon = commitlintPackageConfig.bin, keys(_commitlintPackageCon)), first(_ref))} --edit "$1"`]);
16
16
  }
17
17
  await this.config.prepare();
@@ -5,8 +5,8 @@ import keys from "@dword-design/functions/dist/keys.js";
5
5
  import map from "@dword-design/functions/dist/map.js";
6
6
  import replace from "@dword-design/functions/dist/replace.js";
7
7
  import { constantCase } from 'constant-case';
8
- import execa from 'execa';
9
- import findUp from 'find-up';
8
+ import { execa } from 'execa';
9
+ import { findUpSync } from 'find-up';
10
10
  import fs from 'fs-extra';
11
11
  import os from 'os';
12
12
  export default async function (options) {
@@ -17,7 +17,7 @@ export default async function (options) {
17
17
  ...options
18
18
  };
19
19
  const volumeName = (_ref = (_this$packageConfig$n = this.packageConfig.name, replace('@', '')(_this$packageConfig$n)), replace('/', '-')(_ref));
20
- const envSchemaPath = findUp.sync('.env.schema.json');
20
+ const envSchemaPath = findUpSync('.env.schema.json');
21
21
  const envVariableNames = (_ref2 = (_ref3 = envSchemaPath ? await fs.readJson(envSchemaPath) : {}, keys(_ref3)), map(name => {
22
22
  var _name;
23
23
  return `TEST_${(_name = name, constantCase(_name))}`;
@@ -2,7 +2,6 @@
2
2
 
3
3
  exports[`index coverage file extension 1`] = `
4
4
  "
5
-
6
5
  0 passing
7
6
 
8
7
  -----------|---------|----------|---------|---------|-------------------
@@ -15,13 +14,13 @@ All files | 100 | 100 | 100 | 100 |
15
14
 
16
15
  exports[`index multiple patterns 1`] = `
17
16
  "
18
-
17
+ src/index1.spec.js
19
18
  index1
20
- ✓ valid
19
+ ✓ valid
21
20
 
21
+ src/index2.spec.js
22
22
  index2
23
- ✓ valid
24
-
23
+ ✓ valid
25
24
 
26
25
  2 passing
27
26
 
@@ -4,9 +4,8 @@ import includes from "@dword-design/functions/dist/includes.js";
4
4
  import packageJsonSchema from '@dword-design/package-json-schema';
5
5
  import Ajv from 'ajv';
6
6
  import packageName from 'depcheck-package-name';
7
- import execa from 'execa';
7
+ import { execa } from 'execa';
8
8
  import { createRequire } from 'module';
9
- import stdEnv from 'std-env';
10
9
  import isCI from "./is-ci.js";
11
10
  const _require = createRequire(import.meta.url);
12
11
  const ajv = new Ajv({
@@ -16,7 +15,7 @@ const validatePackageJson = ajv.compile(packageJsonSchema);
16
15
  export default async function (options) {
17
16
  var _ref, _this$config$coverage;
18
17
  options = {
19
- log: !stdEnv.test,
18
+ log: process.env.NODE_ENV !== 'test',
20
19
  patterns: [],
21
20
  ...options
22
21
  };
@@ -31,7 +30,7 @@ export default async function (options) {
31
30
  await this.depcheck();
32
31
  }
33
32
  const runDockerTests = !isCI() || !(_ref = ['win32', 'darwin'], includes(process.platform)(_ref));
34
- return execa(this.packageConfig.type === 'module' ? packageName`c8` : packageName`nyc`, ['--reporter', 'lcov', '--reporter', 'text', '--cwd', process.cwd(), '--all', ...(_this$config$coverage = this.config.coverageFileExtensions, flatMap(extension => ['--extension', extension])(_this$config$coverage)), '--exclude', '**/*.spec.js', '--exclude', 'coverage', '--exclude', 'tmp-*', '--exclude', 'dist', 'mocha', '--ui', packageName`mocha-ui-exports-auto-describe`, '--require', packageName`@dword-design/babel-register`, '--require', packageName`@dword-design/pretest`, '--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'] : [])], {
33
+ return execa(this.packageConfig.type === 'module' ? packageName`c8` : packageName`nyc`, ['--reporter', 'lcov', '--reporter', 'text', '--cwd', process.cwd(), '--all', ...(_this$config$coverage = this.config.coverageFileExtensions, flatMap(extension => ['--extension', extension])(_this$config$coverage)), '--exclude', '**/*.spec.js', '--exclude', 'coverage', '--exclude', 'tmp-*', '--exclude', 'dist', 'mocha', '--reporter', packageName`mocha-spec-reporter-with-file-names`, '--ui', packageName`mocha-ui-exports-auto-describe`, '--require', packageName`@dword-design/babel-register`, '--require', packageName`@dword-design/pretest`, '--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'] : [])], {
35
34
  env: {
36
35
  NODE_ENV: 'test',
37
36
  ...(this.packageConfig.type === 'module' && {
@@ -1,7 +1,7 @@
1
- import execa from 'execa';
1
+ import { execaCommandSync } from 'execa';
2
2
  export default (() => {
3
3
  try {
4
- execa.commandSync('is-ci');
4
+ execaCommandSync('is-ci');
5
5
  return true;
6
6
  } catch {
7
7
  return false;
@@ -2,17 +2,17 @@ import fromPairs from "@dword-design/functions/dist/from-pairs.js";
2
2
  import keys from "@dword-design/functions/dist/keys.js";
3
3
  import map from "@dword-design/functions/dist/map.js";
4
4
  import { constantCase } from 'constant-case';
5
- import findUp from 'find-up';
5
+ import { findUpStop, findUpSync } from 'find-up';
6
6
  import fs from 'fs-extra';
7
7
  import P from 'path';
8
8
  export default (() => {
9
9
  var _ref, _ref2, _ref3, _envVariableNames;
10
- const envSchemaPath = findUp.sync(path => {
10
+ const envSchemaPath = findUpSync(path => {
11
11
  if (fs.existsSync('.env.schema.json')) {
12
12
  return '.env.schema.json';
13
13
  }
14
14
  if (fs.existsSync(P.join(path, 'package.json'))) {
15
- return findUp.stop;
15
+ return findUpStop;
16
16
  }
17
17
  return undefined;
18
18
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dword-design/base",
3
- "version": "9.2.0",
3
+ "version": "9.2.1",
4
4
  "description": "Base package for projects.",
5
5
  "repository": "dword-design/base",
6
6
  "funding": "https://github.com/sponsors/dword-design",
@@ -26,15 +26,15 @@
26
26
  "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"
27
27
  },
28
28
  "dependencies": {
29
- "@commitlint/cli": "^13.0.0",
30
- "@commitlint/config-conventional": "^13.0.0",
29
+ "@commitlint/cli": "^17.4.0",
30
+ "@commitlint/config-conventional": "^17.4.0",
31
31
  "@dword-design/babel-config": "^2.0.0",
32
32
  "@dword-design/babel-register": "^1.0.0",
33
33
  "@dword-design/base-config-node": "^1.6.0",
34
34
  "@dword-design/ci": "^3.0.0",
35
35
  "@dword-design/eslint-config": "^3.0.6",
36
36
  "@dword-design/functions": "^4.0.0",
37
- "@dword-design/package-json-schema": "^1.0.0",
37
+ "@dword-design/package-json-schema": "^2.0.0",
38
38
  "@dword-design/personal-data": "^1.0.1",
39
39
  "@dword-design/pretest": "^1.0.0",
40
40
  "@dword-design/setup-test": "^1.0.0",
@@ -46,28 +46,29 @@
46
46
  "c8": "^7.12.0",
47
47
  "commitizen": "^4.0.3",
48
48
  "constant-case": "^3.0.3",
49
- "cosmiconfig": "^7.0.0",
49
+ "cosmiconfig": "^8.0.0",
50
50
  "cz-conventional-changelog": "^3.1.0",
51
51
  "deepmerge": "^4.2.2",
52
52
  "depcheck": "npm:@dword-design/depcheck",
53
- "depcheck-detector-execa": "^2.0.0",
54
- "depcheck-detector-package-name": "^2.0.0",
53
+ "depcheck-detector-execa": "^3.0.4",
54
+ "depcheck-detector-package-name": "^3.0.0",
55
55
  "depcheck-package-name": "^2.0.0",
56
56
  "depcheck-parser-babel": "^2.0.0",
57
57
  "eslint": "~7.32.0",
58
- "execa": "^5.0.0",
59
- "find-up": "^5.0.0",
60
- "fs-extra": "^10.0.0",
58
+ "execa": "^6.1.0",
59
+ "find-up": "^6.3.0",
60
+ "fs-extra": "^11.1.0",
61
61
  "get-projectz-readme-section-regex": "^3.0.0",
62
- "globby": "^11.0.1",
63
- "hosted-git-info": "^5.0.0",
64
- "husky": "^7.0.0",
62
+ "globby": "^13.1.3",
63
+ "hosted-git-info": "^6.1.1",
64
+ "husky": "^8.0.3",
65
65
  "ignore": "^5.1.4",
66
66
  "is-ci": "^3.0.0",
67
67
  "jiti": "^1.16.0",
68
68
  "load-pkg": "^4.0.0",
69
69
  "make-cli": "^2.0.0",
70
- "mocha": "^9.0.0",
70
+ "mocha": "^10.2.0",
71
+ "mocha-spec-reporter-with-file-names": "npm:@dword-design/mocha-spec-reporter-with-file-names",
71
72
  "mocha-ui-exports-auto-describe": "^2.0.0",
72
73
  "nyc": "^15.0.0",
73
74
  "output-files": "^2.0.0",
@@ -76,23 +77,22 @@
76
77
  "plugin-name-to-package-name": "npm:@dword-design/plugin-name-to-package-name",
77
78
  "safe-readfile": "^1.0.2",
78
79
  "semantic-release": "^17.0.3",
79
- "sort-keys": "^4.2.0",
80
- "sort-package-json": "~1.57.0",
80
+ "sort-keys": "^5.0.0",
81
+ "sort-package-json": "^2.1.0",
81
82
  "spdx-expression-parse": "^3.0.0",
82
83
  "spdx-license-list": "^6.1.0",
83
- "std-env": "^2.3.0",
84
84
  "suppress-experimental-warnings": "^1.1.0",
85
- "yaml": "^1.8.2"
85
+ "yaml": "^2.2.1"
86
86
  },
87
87
  "devDependencies": {
88
88
  "@babel/cli": "^7.6.4",
89
89
  "@dword-design/chdir": "^2.0.6",
90
90
  "@dword-design/tester": "^2.0.0",
91
91
  "@dword-design/tester-plugin-tmp-dir": "^2.0.0",
92
- "is-docker": "^2.1.1",
93
- "p-event": "^4.2.0",
92
+ "is-docker": "^3.0.0",
93
+ "p-event": "^5.0.1",
94
94
  "rimraf": "^3.0.0",
95
- "sharp": "^0.30.0",
95
+ "sharp": "^0.31.3",
96
96
  "unify-mocha-output": "^2.0.0"
97
97
  },
98
98
  "engines": {