@commercetools-frontend/create-mc-app 22.3.4 → 22.5.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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @commercetools-frontend/create-mc-app
2
2
 
3
+ ## 22.5.0
4
+
5
+ ### Patch Changes
6
+
7
+ - [#3135](https://github.com/commercetools/merchant-center-application-kit/pull/3135) [`6c4094e0e`](https://github.com/commercetools/merchant-center-application-kit/commit/6c4094e0e99461b860e3a2eda7b47094858ea329) Thanks [@renovate](https://github.com/apps/renovate)! - Update `@tsconfig/node16` dependency.
8
+
9
+ ## 22.4.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#3119](https://github.com/commercetools/merchant-center-application-kit/pull/3119) [`5c989899c`](https://github.com/commercetools/merchant-center-application-kit/commit/5c989899c2b80539182d74ab20374304d6709395) Thanks [@renovate](https://github.com/apps/renovate)! - Update `semver` dependency.
14
+
15
+ ### Patch Changes
16
+
17
+ - [#3138](https://github.com/commercetools/merchant-center-application-kit/pull/3138) [`5f4c47f8f`](https://github.com/commercetools/merchant-center-application-kit/commit/5f4c47f8f98e798ed24ce33b66130a273fa2e25a) Thanks [@emmenko](https://github.com/emmenko)! - Run `npm install` command with `--legacy-peer-deps` option
18
+
3
19
  ## 22.3.4
4
20
 
5
21
  ## 22.3.3
@@ -67,7 +67,7 @@ var prettier__default = /*#__PURE__*/_interopDefault(prettier);
67
67
 
68
68
  var pkgJson = {
69
69
  name: "@commercetools-frontend/create-mc-app",
70
- version: "22.3.4",
70
+ version: "22.5.0",
71
71
  description: "Create Merchant Center applications to quickly get up and running",
72
72
  bugs: "https://github.com/commercetools/merchant-center-application-kit/issues",
73
73
  repository: {
@@ -99,10 +99,10 @@ var pkgJson = {
99
99
  execa: "5.1.1",
100
100
  listr2: "5.0.8",
101
101
  prettier: "2.8.8",
102
- semver: "7.5.0"
102
+ semver: "7.5.2"
103
103
  },
104
104
  devDependencies: {
105
- "@tsconfig/node16": "^1.0.3"
105
+ "@tsconfig/node16": "^16.0.0"
106
106
  },
107
107
  engines: {
108
108
  node: "16.x || >=18.0.0"
@@ -151,6 +151,15 @@ const getPreferredPackageManager = options => {
151
151
  // Fall back to npm
152
152
  return 'npm';
153
153
  };
154
+ const getInstallCommand = options => {
155
+ const packageManager = getPreferredPackageManager(options);
156
+ switch (packageManager) {
157
+ case 'npm':
158
+ return 'npm install --legacy-peer-deps';
159
+ default:
160
+ return "".concat(packageManager, " install");
161
+ }
162
+ };
154
163
  const slugify = name => name.toLowerCase().replace(/_/gi, '-');
155
164
  const upperFirst = value => value.charAt(0).toUpperCase() + _sliceInstanceProperty__default["default"](value).call(value, 1);
156
165
  const wordify = slug => {
@@ -337,11 +346,11 @@ function installDependencies(options) {
337
346
  return {
338
347
  title: 'Installing dependencies (this might take a while)',
339
348
  task: () => {
340
- const packageManager = getPreferredPackageManager(options);
349
+ const installCommand = getInstallCommand(options);
341
350
 
342
351
  // TODO: we could check for min yarn/npm versions
343
352
  // See https://github.com/facebook/create-react-app/blob/0f4781e8507249ce29a9ac1409fece67c1a53c38/packages/create-react-app/createReactApp.js#L225-L254
344
- return execa__default["default"](packageManager, ['install'], {
353
+ return execa__default["default"].command(installCommand, {
345
354
  cwd: options.projectDirectoryPath,
346
355
  encoding: 'utf-8'
347
356
  });
@@ -67,7 +67,7 @@ var prettier__default = /*#__PURE__*/_interopDefault(prettier);
67
67
 
68
68
  var pkgJson = {
69
69
  name: "@commercetools-frontend/create-mc-app",
70
- version: "22.3.4",
70
+ version: "22.5.0",
71
71
  description: "Create Merchant Center applications to quickly get up and running",
72
72
  bugs: "https://github.com/commercetools/merchant-center-application-kit/issues",
73
73
  repository: {
@@ -99,10 +99,10 @@ var pkgJson = {
99
99
  execa: "5.1.1",
100
100
  listr2: "5.0.8",
101
101
  prettier: "2.8.8",
102
- semver: "7.5.0"
102
+ semver: "7.5.2"
103
103
  },
104
104
  devDependencies: {
105
- "@tsconfig/node16": "^1.0.3"
105
+ "@tsconfig/node16": "^16.0.0"
106
106
  },
107
107
  engines: {
108
108
  node: "16.x || >=18.0.0"
@@ -151,6 +151,15 @@ const getPreferredPackageManager = options => {
151
151
  // Fall back to npm
152
152
  return 'npm';
153
153
  };
154
+ const getInstallCommand = options => {
155
+ const packageManager = getPreferredPackageManager(options);
156
+ switch (packageManager) {
157
+ case 'npm':
158
+ return 'npm install --legacy-peer-deps';
159
+ default:
160
+ return "".concat(packageManager, " install");
161
+ }
162
+ };
154
163
  const slugify = name => name.toLowerCase().replace(/_/gi, '-');
155
164
  const upperFirst = value => value.charAt(0).toUpperCase() + _sliceInstanceProperty__default["default"](value).call(value, 1);
156
165
  const wordify = slug => {
@@ -337,11 +346,11 @@ function installDependencies(options) {
337
346
  return {
338
347
  title: 'Installing dependencies (this might take a while)',
339
348
  task: () => {
340
- const packageManager = getPreferredPackageManager(options);
349
+ const installCommand = getInstallCommand(options);
341
350
 
342
351
  // TODO: we could check for min yarn/npm versions
343
352
  // See https://github.com/facebook/create-react-app/blob/0f4781e8507249ce29a9ac1409fece67c1a53c38/packages/create-react-app/createReactApp.js#L225-L254
344
- return execa__default["default"](packageManager, ['install'], {
353
+ return execa__default["default"].command(installCommand, {
345
354
  cwd: options.projectDirectoryPath,
346
355
  encoding: 'utf-8'
347
356
  });
@@ -33,7 +33,7 @@ import prettier from 'prettier';
33
33
 
34
34
  var pkgJson = {
35
35
  name: "@commercetools-frontend/create-mc-app",
36
- version: "22.3.4",
36
+ version: "22.5.0",
37
37
  description: "Create Merchant Center applications to quickly get up and running",
38
38
  bugs: "https://github.com/commercetools/merchant-center-application-kit/issues",
39
39
  repository: {
@@ -65,10 +65,10 @@ var pkgJson = {
65
65
  execa: "5.1.1",
66
66
  listr2: "5.0.8",
67
67
  prettier: "2.8.8",
68
- semver: "7.5.0"
68
+ semver: "7.5.2"
69
69
  },
70
70
  devDependencies: {
71
- "@tsconfig/node16": "^1.0.3"
71
+ "@tsconfig/node16": "^16.0.0"
72
72
  },
73
73
  engines: {
74
74
  node: "16.x || >=18.0.0"
@@ -117,6 +117,15 @@ const getPreferredPackageManager = options => {
117
117
  // Fall back to npm
118
118
  return 'npm';
119
119
  };
120
+ const getInstallCommand = options => {
121
+ const packageManager = getPreferredPackageManager(options);
122
+ switch (packageManager) {
123
+ case 'npm':
124
+ return 'npm install --legacy-peer-deps';
125
+ default:
126
+ return "".concat(packageManager, " install");
127
+ }
128
+ };
120
129
  const slugify = name => name.toLowerCase().replace(/_/gi, '-');
121
130
  const upperFirst = value => value.charAt(0).toUpperCase() + _sliceInstanceProperty(value).call(value, 1);
122
131
  const wordify = slug => {
@@ -303,11 +312,11 @@ function installDependencies(options) {
303
312
  return {
304
313
  title: 'Installing dependencies (this might take a while)',
305
314
  task: () => {
306
- const packageManager = getPreferredPackageManager(options);
315
+ const installCommand = getInstallCommand(options);
307
316
 
308
317
  // TODO: we could check for min yarn/npm versions
309
318
  // See https://github.com/facebook/create-react-app/blob/0f4781e8507249ce29a9ac1409fece67c1a53c38/packages/create-react-app/createReactApp.js#L225-L254
310
- return execa(packageManager, ['install'], {
319
+ return execa.command(installCommand, {
311
320
  cwd: options.projectDirectoryPath,
312
321
  encoding: 'utf-8'
313
322
  });
@@ -2,8 +2,9 @@ import type { TCliTaskOptions, TPackageManager } from './types';
2
2
  declare const isSemVer: (version: string) => boolean;
3
3
  declare const shouldUseYarn: () => boolean;
4
4
  declare const getPreferredPackageManager: (options: TCliTaskOptions) => TPackageManager;
5
+ declare const getInstallCommand: (options: TCliTaskOptions) => string;
5
6
  declare const slugify: (name: string) => string;
6
7
  declare const upperFirst: (value: string) => string;
7
8
  declare const wordify: (slug: string) => string;
8
9
  declare const resolveFilePathByExtension: (requestedModule: string) => string;
9
- export { isSemVer, shouldUseYarn, slugify, wordify, upperFirst, resolveFilePathByExtension, getPreferredPackageManager, };
10
+ export { isSemVer, shouldUseYarn, slugify, wordify, upperFirst, resolveFilePathByExtension, getPreferredPackageManager, getInstallCommand, };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/create-mc-app",
3
- "version": "22.3.4",
3
+ "version": "22.5.0",
4
4
  "description": "Create Merchant Center applications to quickly get up and running",
5
5
  "bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
6
6
  "repository": {
@@ -32,10 +32,10 @@
32
32
  "execa": "5.1.1",
33
33
  "listr2": "5.0.8",
34
34
  "prettier": "2.8.8",
35
- "semver": "7.5.0"
35
+ "semver": "7.5.2"
36
36
  },
37
37
  "devDependencies": {
38
- "@tsconfig/node16": "^1.0.3"
38
+ "@tsconfig/node16": "^16.0.0"
39
39
  },
40
40
  "engines": {
41
41
  "node": "16.x || >=18.0.0"
@@ -1,17 +1,17 @@
1
1
  import execa from 'execa';
2
2
  import type { ListrTask } from 'listr2';
3
3
  import type { TCliTaskOptions } from '../types';
4
- import { getPreferredPackageManager } from '../utils';
4
+ import { getInstallCommand } from '../utils';
5
5
 
6
6
  function installDependencies(options: TCliTaskOptions): ListrTask {
7
7
  return {
8
8
  title: 'Installing dependencies (this might take a while)',
9
9
  task: () => {
10
- const packageManager = getPreferredPackageManager(options);
10
+ const installCommand = getInstallCommand(options);
11
11
 
12
12
  // TODO: we could check for min yarn/npm versions
13
13
  // See https://github.com/facebook/create-react-app/blob/0f4781e8507249ce29a9ac1409fece67c1a53c38/packages/create-react-app/createReactApp.js#L225-L254
14
- return execa(packageManager, ['install'], {
14
+ return execa.command(installCommand, {
15
15
  cwd: options.projectDirectoryPath,
16
16
  encoding: 'utf-8',
17
17
  });
package/src/utils.ts CHANGED
@@ -27,6 +27,17 @@ const getPreferredPackageManager = (
27
27
  return 'npm';
28
28
  };
29
29
 
30
+ const getInstallCommand = (options: TCliTaskOptions): string => {
31
+ const packageManager = getPreferredPackageManager(options);
32
+
33
+ switch (packageManager) {
34
+ case 'npm':
35
+ return 'npm install --legacy-peer-deps';
36
+ default:
37
+ return `${packageManager} install`;
38
+ }
39
+ };
40
+
30
41
  const slugify = (name: string) => name.toLowerCase().replace(/_/gi, '-');
31
42
 
32
43
  const upperFirst = (value: string) =>
@@ -54,4 +65,5 @@ export {
54
65
  upperFirst,
55
66
  resolveFilePathByExtension,
56
67
  getPreferredPackageManager,
68
+ getInstallCommand,
57
69
  };