@dword-design/base 12.0.17 → 12.0.18
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,10 +2,14 @@ import { execa } from 'execa';
|
|
|
2
2
|
export default function (options) {
|
|
3
3
|
options = {
|
|
4
4
|
log: process.env.NODE_ENV !== 'test',
|
|
5
|
+
stderr: 'inherit',
|
|
5
6
|
...options
|
|
6
7
|
};
|
|
7
8
|
return execa('git-cz', [...(options.allowEmpty ? ['--allow-empty'] : [])], {
|
|
8
9
|
cwd: this.cwd,
|
|
9
|
-
|
|
10
|
+
...(options.log && {
|
|
11
|
+
stdout: 'inherit'
|
|
12
|
+
}),
|
|
13
|
+
stderr: options.stderr
|
|
10
14
|
});
|
|
11
15
|
}
|
|
@@ -3,6 +3,7 @@ import parsePackagejsonName from 'parse-packagejson-name';
|
|
|
3
3
|
export default async function (options) {
|
|
4
4
|
options = {
|
|
5
5
|
log: process.env.NODE_ENV !== 'test',
|
|
6
|
+
stderr: 'inherit',
|
|
6
7
|
...options
|
|
7
8
|
};
|
|
8
9
|
const packageName = parsePackagejsonName(this.packageConfig.name).fullName;
|
|
@@ -11,7 +12,10 @@ export default async function (options) {
|
|
|
11
12
|
}
|
|
12
13
|
await this.config.lint.call(this, options);
|
|
13
14
|
await execa('eslint', ['--fix', '.'], {
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
...(options.log && {
|
|
16
|
+
stdout: 'inherit'
|
|
17
|
+
}),
|
|
18
|
+
cwd: this.cwd,
|
|
19
|
+
stderr: options.stderr
|
|
16
20
|
});
|
|
17
21
|
}
|
|
@@ -10,6 +10,7 @@ const commitlintPackageConfig = _require(packageName`@commitlint/cli/package.jso
|
|
|
10
10
|
export default async function (options) {
|
|
11
11
|
options = {
|
|
12
12
|
log: process.env.NODE_ENV !== 'test',
|
|
13
|
+
stderr: 'inherit',
|
|
13
14
|
...options
|
|
14
15
|
};
|
|
15
16
|
await outputFiles(this.cwd, this.generatedFiles);
|
|
@@ -17,11 +18,17 @@ export default async function (options) {
|
|
|
17
18
|
var _ref, _commitlintPackageCon;
|
|
18
19
|
await execaCommand('husky install', {
|
|
19
20
|
cwd: this.cwd,
|
|
20
|
-
|
|
21
|
+
...(options.log && {
|
|
22
|
+
stdout: 'inherit'
|
|
23
|
+
}),
|
|
24
|
+
stderr: options.stderr
|
|
21
25
|
});
|
|
22
26
|
await execa('husky', ['set', '.husky/commit-msg', `npx ${_ref = (_commitlintPackageCon = commitlintPackageConfig.bin, keys(_commitlintPackageCon)), first(_ref)} --edit "$1"`], {
|
|
23
27
|
cwd: this.cwd,
|
|
24
|
-
|
|
28
|
+
...(options.log && {
|
|
29
|
+
stdout: 'inherit'
|
|
30
|
+
}),
|
|
31
|
+
stderr: options.stderr
|
|
25
32
|
});
|
|
26
33
|
}
|
|
27
34
|
await this.config.prepare(options);
|
|
@@ -9,6 +9,7 @@ export default async function (options) {
|
|
|
9
9
|
options = {
|
|
10
10
|
log: process.env.NODE_ENV !== 'test',
|
|
11
11
|
patterns: [],
|
|
12
|
+
stderr: 'inherit',
|
|
12
13
|
...options
|
|
13
14
|
};
|
|
14
15
|
const volumeName = (_ref = (_this$packageConfig$n = this.packageConfig.name, replace('@', '')(_this$packageConfig$n)), replace('/', '-')(_ref));
|
|
@@ -24,7 +25,10 @@ export default async function (options) {
|
|
|
24
25
|
var _ref4, _envVariableNames, _ref5;
|
|
25
26
|
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', `${this.cwd}:/app`, '-v', `${volumeName}:/app/node_modules`, 'dworddesign/testing:latest', 'bash', '-c', (_ref5 = ['pnpm install --frozen-lockfile', '&&', 'pnpm test:raw', ...(options.updateSnapshots ? [' --update-snapshots'] : []), ...options.patterns.map(pattern => `"${pattern}"`), ...(options.grep ? [`-g "${options.grep}"`] : [])], join(' ')(_ref5))], {
|
|
26
27
|
cwd: this.cwd,
|
|
27
|
-
|
|
28
|
+
...(options.log && {
|
|
29
|
+
stdout: 'inherit'
|
|
30
|
+
}),
|
|
31
|
+
stderr: options.stderr
|
|
28
32
|
});
|
|
29
33
|
} finally {
|
|
30
34
|
await execa('docker', ['run', '--rm', '--tty', '-v', `${this.cwd}:/app`, '-v', `${volumeName}:/app/node_modules`, 'dworddesign/testing:latest', 'bash', '-c', `chown -R ${userInfo.uid}:${userInfo.gid} /app`], {
|
|
@@ -15,10 +15,9 @@ const validatePackageJson = ajv.compile(packageJsonSchema);
|
|
|
15
15
|
export default async function (options) {
|
|
16
16
|
var _ref;
|
|
17
17
|
options = {
|
|
18
|
-
all: false,
|
|
19
18
|
log: process.env.NODE_ENV !== 'test',
|
|
20
19
|
patterns: [],
|
|
21
|
-
stderr:
|
|
20
|
+
stderr: 'inherit',
|
|
22
21
|
...options
|
|
23
22
|
};
|
|
24
23
|
if (options.patterns.length === 0) {
|
|
@@ -54,9 +53,9 @@ export default async function (options) {
|
|
|
54
53
|
SNAPSHOT_UPDATE: 1
|
|
55
54
|
} : {})
|
|
56
55
|
},
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
...(options.log && {
|
|
57
|
+
stdout: 'inherit'
|
|
58
|
+
}),
|
|
59
|
+
stderr: options.stderr
|
|
61
60
|
});
|
|
62
61
|
}
|