@nice-move/init 0.3.4 → 0.3.5

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/lib/latest.mjs CHANGED
@@ -6,7 +6,7 @@ export default {
6
6
  garou: '^0.1.40',
7
7
  prettier: '^2.3.2',
8
8
  stylelint: '^13.13.1',
9
- typescript: '^4.4.2',
9
+ typescript: '^4.4.3',
10
10
  '@types/react': '^16.14.11',
11
11
  react: '~16.14.0',
12
12
  'react-dom': '~16.14.0',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nice-move/init",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "description": "Initialize your frontend workspaces",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -47,11 +47,11 @@
47
47
  "fs-chain": "8.1.0",
48
48
  "is-git-dirty": "^2.0.1",
49
49
  "is-git-repository": "^2.0.0",
50
- "ora": "^6.0.0",
50
+ "ora": "^6.0.1",
51
51
  "os-locale": "^6.0.0",
52
52
  "parse-author": "^2.0.0",
53
53
  "prompts": "^2.4.1",
54
- "semver-regex": "^4.0.1",
54
+ "semver-regex": "^3.1.3",
55
55
  "stringify-author": "^0.1.3",
56
56
  "user-meta": "^1.0.0",
57
57
  "validate-npm-package-name": "^3.0.0",
@@ -8,6 +8,10 @@ import { getAuthor, trim } from '../lib/utils.mjs';
8
8
 
9
9
  const semver = semverRegex();
10
10
 
11
+ function arrayLength(data) {
12
+ return Array.isArray(data) && data.length > 0;
13
+ }
14
+
11
15
  export async function Package({
12
16
  cwd,
13
17
  pkg: {
@@ -84,7 +88,7 @@ export async function Package({
84
88
  first === false ||
85
89
  isPrivate === false ||
86
90
  feedback.private === false ||
87
- ((workspaces.packages || workspaces)?.length ?? 0) > 0
91
+ arrayLength(workspaces ? workspaces.packages : workspaces)
88
92
  ? null
89
93
  : 'toggle',
90
94
  },