@commercetools-frontend/create-mc-app 21.23.6 → 21.23.7

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,13 @@
1
1
  # @commercetools-frontend/create-mc-app
2
2
 
3
+ ## 21.23.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [#2958](https://github.com/commercetools/merchant-center-application-kit/pull/2958) [`c8069d85d`](https://github.com/commercetools/merchant-center-application-kit/commit/c8069d85d8218578f1a863a531cb2c3e76551eeb) Thanks [@kark](https://github.com/kark)! - Replace `rcfile` for reading Prettier config with Prettier API
8
+
9
+ - [#2960](https://github.com/commercetools/merchant-center-application-kit/pull/2960) [`4377b3642`](https://github.com/commercetools/merchant-center-application-kit/commit/4377b3642c08fd9480016a287a18ada780191ad6) Thanks [@emmenko](https://github.com/emmenko)! - Update dependencies
10
+
3
11
  ## 21.23.6
4
12
 
5
13
  ## 21.23.5
@@ -30,7 +30,6 @@ var _reduceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/ins
30
30
  var _Object$entries = require('@babel/runtime-corejs3/core-js-stable/object/entries');
31
31
  var _Object$assign = require('@babel/runtime-corejs3/core-js-stable/object/assign');
32
32
  var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
33
- var rcfile = require('rcfile');
34
33
  var prettier = require('prettier');
35
34
  var core = require('@babel/core');
36
35
  var _Promise = require('@babel/runtime-corejs3/core-js-stable/promise');
@@ -63,7 +62,6 @@ var _reduceInstanceProperty__default = /*#__PURE__*/_interopDefault(_reduceInsta
63
62
  var _Object$entries__default = /*#__PURE__*/_interopDefault(_Object$entries);
64
63
  var _Object$assign__default = /*#__PURE__*/_interopDefault(_Object$assign);
65
64
  var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
66
- var rcfile__default = /*#__PURE__*/_interopDefault(rcfile);
67
65
  var prettier__default = /*#__PURE__*/_interopDefault(prettier);
68
66
  var _Promise__default = /*#__PURE__*/_interopDefault(_Promise);
69
67
  var _startsWithInstanceProperty__default = /*#__PURE__*/_interopDefault(_startsWithInstanceProperty);
@@ -442,10 +440,8 @@ function replaceApplicationInfoInCustomApplicationConfig(filePath, options) {
442
440
  });
443
441
 
444
442
  if (result !== null && result !== void 0 && result.code) {
445
- var prettierConfig = rcfile__default["default"]('prettier', {
446
- cwd: options.projectDirectoryPath
447
- });
448
- var formattedData = prettier__default["default"].format(result.code + os__default["default"].EOL, prettierConfig);
443
+ var prettierConfig = prettier__default["default"].resolveConfig.sync(options.projectDirectoryPath);
444
+ var formattedData = prettier__default["default"].format(result.code + os__default["default"].EOL, prettierConfig !== null && prettierConfig !== void 0 ? prettierConfig : undefined);
449
445
  fs__default["default"].writeFileSync(filePath, formattedData, {
450
446
  encoding: 'utf8'
451
447
  });
@@ -479,10 +475,8 @@ function replaceEntryPointUriPathInConstants(filePath, options) {
479
475
  });
480
476
 
481
477
  if (result !== null && result !== void 0 && result.code) {
482
- var prettierConfig = rcfile__default["default"]('prettier', {
483
- cwd: options.projectDirectoryPath
484
- });
485
- var formattedData = prettier__default["default"].format(result.code + os__default["default"].EOL, prettierConfig);
478
+ var prettierConfig = prettier__default["default"].resolveConfig.sync(options.projectDirectoryPath);
479
+ var formattedData = prettier__default["default"].format(result.code + os__default["default"].EOL, prettierConfig !== null && prettierConfig !== void 0 ? prettierConfig : undefined);
486
480
  fs__default["default"].writeFileSync(filePath, formattedData, {
487
481
  encoding: 'utf8'
488
482
  });
@@ -699,7 +693,7 @@ function _processOptions() {
699
693
 
700
694
  var pkgJson = {
701
695
  name: "@commercetools-frontend/create-mc-app",
702
- version: "21.23.6",
696
+ version: "21.23.7",
703
697
  description: "Create Merchant Center applications to quickly get up and running",
704
698
  bugs: "https://github.com/commercetools/merchant-center-application-kit/issues",
705
699
  repository: {
@@ -722,14 +716,13 @@ var pkgJson = {
722
716
  module: "dist/commercetools-frontend-create-mc-app.esm.js",
723
717
  bin: "./bin/cli.js",
724
718
  dependencies: {
725
- "@babel/core": "^7.19.0",
726
- "@babel/runtime": "^7.19.0",
727
- "@babel/runtime-corejs3": "^7.19.0",
719
+ "@babel/core": "^7.20.12",
720
+ "@babel/runtime": "^7.20.13",
721
+ "@babel/runtime-corejs3": "^7.20.13",
728
722
  cac: "6.7.14",
729
723
  execa: "5.1.1",
730
- listr2: "5.0.5",
731
- prettier: "2.7.1",
732
- rcfile: "1.0.3",
724
+ listr2: "5.0.7",
725
+ prettier: "2.8.4",
733
726
  semver: "7.3.8"
734
727
  },
735
728
  engines: {
@@ -30,7 +30,6 @@ var _reduceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/ins
30
30
  var _Object$entries = require('@babel/runtime-corejs3/core-js-stable/object/entries');
31
31
  var _Object$assign = require('@babel/runtime-corejs3/core-js-stable/object/assign');
32
32
  var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
33
- var rcfile = require('rcfile');
34
33
  var prettier = require('prettier');
35
34
  var core = require('@babel/core');
36
35
  var _Promise = require('@babel/runtime-corejs3/core-js-stable/promise');
@@ -63,7 +62,6 @@ var _reduceInstanceProperty__default = /*#__PURE__*/_interopDefault(_reduceInsta
63
62
  var _Object$entries__default = /*#__PURE__*/_interopDefault(_Object$entries);
64
63
  var _Object$assign__default = /*#__PURE__*/_interopDefault(_Object$assign);
65
64
  var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
66
- var rcfile__default = /*#__PURE__*/_interopDefault(rcfile);
67
65
  var prettier__default = /*#__PURE__*/_interopDefault(prettier);
68
66
  var _Promise__default = /*#__PURE__*/_interopDefault(_Promise);
69
67
  var _startsWithInstanceProperty__default = /*#__PURE__*/_interopDefault(_startsWithInstanceProperty);
@@ -442,10 +440,8 @@ function replaceApplicationInfoInCustomApplicationConfig(filePath, options) {
442
440
  });
443
441
 
444
442
  if (result !== null && result !== void 0 && result.code) {
445
- var prettierConfig = rcfile__default["default"]('prettier', {
446
- cwd: options.projectDirectoryPath
447
- });
448
- var formattedData = prettier__default["default"].format(result.code + os__default["default"].EOL, prettierConfig);
443
+ var prettierConfig = prettier__default["default"].resolveConfig.sync(options.projectDirectoryPath);
444
+ var formattedData = prettier__default["default"].format(result.code + os__default["default"].EOL, prettierConfig !== null && prettierConfig !== void 0 ? prettierConfig : undefined);
449
445
  fs__default["default"].writeFileSync(filePath, formattedData, {
450
446
  encoding: 'utf8'
451
447
  });
@@ -479,10 +475,8 @@ function replaceEntryPointUriPathInConstants(filePath, options) {
479
475
  });
480
476
 
481
477
  if (result !== null && result !== void 0 && result.code) {
482
- var prettierConfig = rcfile__default["default"]('prettier', {
483
- cwd: options.projectDirectoryPath
484
- });
485
- var formattedData = prettier__default["default"].format(result.code + os__default["default"].EOL, prettierConfig);
478
+ var prettierConfig = prettier__default["default"].resolveConfig.sync(options.projectDirectoryPath);
479
+ var formattedData = prettier__default["default"].format(result.code + os__default["default"].EOL, prettierConfig !== null && prettierConfig !== void 0 ? prettierConfig : undefined);
486
480
  fs__default["default"].writeFileSync(filePath, formattedData, {
487
481
  encoding: 'utf8'
488
482
  });
@@ -699,7 +693,7 @@ function _processOptions() {
699
693
 
700
694
  var pkgJson = {
701
695
  name: "@commercetools-frontend/create-mc-app",
702
- version: "21.23.6",
696
+ version: "21.23.7",
703
697
  description: "Create Merchant Center applications to quickly get up and running",
704
698
  bugs: "https://github.com/commercetools/merchant-center-application-kit/issues",
705
699
  repository: {
@@ -722,14 +716,13 @@ var pkgJson = {
722
716
  module: "dist/commercetools-frontend-create-mc-app.esm.js",
723
717
  bin: "./bin/cli.js",
724
718
  dependencies: {
725
- "@babel/core": "^7.19.0",
726
- "@babel/runtime": "^7.19.0",
727
- "@babel/runtime-corejs3": "^7.19.0",
719
+ "@babel/core": "^7.20.12",
720
+ "@babel/runtime": "^7.20.13",
721
+ "@babel/runtime-corejs3": "^7.20.13",
728
722
  cac: "6.7.14",
729
723
  execa: "5.1.1",
730
- listr2: "5.0.5",
731
- prettier: "2.7.1",
732
- rcfile: "1.0.3",
724
+ listr2: "5.0.7",
725
+ prettier: "2.8.4",
733
726
  semver: "7.3.8"
734
727
  },
735
728
  engines: {
@@ -26,7 +26,6 @@ import _reduceInstanceProperty from '@babel/runtime-corejs3/core-js-stable/insta
26
26
  import _Object$entries from '@babel/runtime-corejs3/core-js-stable/object/entries';
27
27
  import _Object$assign from '@babel/runtime-corejs3/core-js-stable/object/assign';
28
28
  import _JSON$stringify from '@babel/runtime-corejs3/core-js-stable/json/stringify';
29
- import rcfile from 'rcfile';
30
29
  import prettier from 'prettier';
31
30
  import { transformFileSync, types } from '@babel/core';
32
31
  import _Promise from '@babel/runtime-corejs3/core-js-stable/promise';
@@ -406,10 +405,8 @@ function replaceApplicationInfoInCustomApplicationConfig(filePath, options) {
406
405
  });
407
406
 
408
407
  if (result !== null && result !== void 0 && result.code) {
409
- var prettierConfig = rcfile('prettier', {
410
- cwd: options.projectDirectoryPath
411
- });
412
- var formattedData = prettier.format(result.code + os.EOL, prettierConfig);
408
+ var prettierConfig = prettier.resolveConfig.sync(options.projectDirectoryPath);
409
+ var formattedData = prettier.format(result.code + os.EOL, prettierConfig !== null && prettierConfig !== void 0 ? prettierConfig : undefined);
413
410
  fs.writeFileSync(filePath, formattedData, {
414
411
  encoding: 'utf8'
415
412
  });
@@ -443,10 +440,8 @@ function replaceEntryPointUriPathInConstants(filePath, options) {
443
440
  });
444
441
 
445
442
  if (result !== null && result !== void 0 && result.code) {
446
- var prettierConfig = rcfile('prettier', {
447
- cwd: options.projectDirectoryPath
448
- });
449
- var formattedData = prettier.format(result.code + os.EOL, prettierConfig);
443
+ var prettierConfig = prettier.resolveConfig.sync(options.projectDirectoryPath);
444
+ var formattedData = prettier.format(result.code + os.EOL, prettierConfig !== null && prettierConfig !== void 0 ? prettierConfig : undefined);
450
445
  fs.writeFileSync(filePath, formattedData, {
451
446
  encoding: 'utf8'
452
447
  });
@@ -663,7 +658,7 @@ function _processOptions() {
663
658
 
664
659
  var pkgJson = {
665
660
  name: "@commercetools-frontend/create-mc-app",
666
- version: "21.23.6",
661
+ version: "21.23.7",
667
662
  description: "Create Merchant Center applications to quickly get up and running",
668
663
  bugs: "https://github.com/commercetools/merchant-center-application-kit/issues",
669
664
  repository: {
@@ -686,14 +681,13 @@ var pkgJson = {
686
681
  module: "dist/commercetools-frontend-create-mc-app.esm.js",
687
682
  bin: "./bin/cli.js",
688
683
  dependencies: {
689
- "@babel/core": "^7.19.0",
690
- "@babel/runtime": "^7.19.0",
691
- "@babel/runtime-corejs3": "^7.19.0",
684
+ "@babel/core": "^7.20.12",
685
+ "@babel/runtime": "^7.20.13",
686
+ "@babel/runtime-corejs3": "^7.20.13",
692
687
  cac: "6.7.14",
693
688
  execa: "5.1.1",
694
- listr2: "5.0.5",
695
- prettier: "2.7.1",
696
- rcfile: "1.0.3",
689
+ listr2: "5.0.7",
690
+ prettier: "2.8.4",
697
691
  semver: "7.3.8"
698
692
  },
699
693
  engines: {
@@ -1,7 +1,7 @@
1
- export declare type TCliGlobalOptions = {
1
+ export type TCliGlobalOptions = {
2
2
  '--'?: string[];
3
3
  };
4
- export declare type TCliCommandOptions = {
4
+ export type TCliCommandOptions = {
5
5
  template: 'starter' | 'starter-typescript';
6
6
  templateVersion: string;
7
7
  skipInstall: boolean;
@@ -9,7 +9,7 @@ export declare type TCliCommandOptions = {
9
9
  entryPointUriPath?: string;
10
10
  initialProjectKey?: string;
11
11
  };
12
- export declare type TCliTaskOptions = {
12
+ export type TCliTaskOptions = {
13
13
  projectDirectoryName: string;
14
14
  projectDirectoryPath: string;
15
15
  templateName: TCliCommandOptions['template'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/create-mc-app",
3
- "version": "21.23.6",
3
+ "version": "21.23.7",
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": {
@@ -18,14 +18,13 @@
18
18
  "module": "dist/commercetools-frontend-create-mc-app.esm.js",
19
19
  "bin": "./bin/cli.js",
20
20
  "dependencies": {
21
- "@babel/core": "^7.19.0",
22
- "@babel/runtime": "^7.19.0",
23
- "@babel/runtime-corejs3": "^7.19.0",
21
+ "@babel/core": "^7.20.12",
22
+ "@babel/runtime": "^7.20.13",
23
+ "@babel/runtime-corejs3": "^7.20.13",
24
24
  "cac": "6.7.14",
25
25
  "execa": "5.1.1",
26
- "listr2": "5.0.5",
27
- "prettier": "2.7.1",
28
- "rcfile": "1.0.3",
26
+ "listr2": "5.0.7",
27
+ "prettier": "2.8.4",
29
28
  "semver": "7.3.8"
30
29
  },
31
30
  "engines": {
@@ -1,8 +1,6 @@
1
1
  import os from 'os';
2
2
  import fs from 'fs';
3
3
  import path from 'path';
4
- // @ts-ignore
5
- import rcfile from 'rcfile';
6
4
  import prettier from 'prettier';
7
5
  import { type PluginItem, transformFileSync, types } from '@babel/core';
8
6
  import type { ListrTask } from 'listr2';
@@ -34,12 +32,15 @@ function replaceEntryPointUriPathInConstants(
34
32
  ],
35
33
  retainLines: true,
36
34
  });
37
-
38
35
  if (result?.code) {
39
- const prettierConfig = rcfile('prettier', {
40
- cwd: options.projectDirectoryPath,
41
- });
42
- const formattedData = prettier.format(result.code + os.EOL, prettierConfig);
36
+ const prettierConfig = prettier.resolveConfig.sync(
37
+ options.projectDirectoryPath
38
+ );
39
+
40
+ const formattedData = prettier.format(
41
+ result.code + os.EOL,
42
+ prettierConfig ?? undefined
43
+ );
43
44
  fs.writeFileSync(filePath, formattedData, {
44
45
  encoding: 'utf8',
45
46
  });
@@ -1,8 +1,6 @@
1
1
  import os from 'os';
2
2
  import fs from 'fs';
3
3
  import path from 'path';
4
- // @ts-ignore
5
- import rcfile from 'rcfile';
6
4
  import prettier from 'prettier';
7
5
  import { transformFileSync, types, type PluginItem } from '@babel/core';
8
6
  import type { ListrTask } from 'listr2';
@@ -57,10 +55,13 @@ function replaceApplicationInfoInCustomApplicationConfig(
57
55
  });
58
56
 
59
57
  if (result?.code) {
60
- const prettierConfig = rcfile('prettier', {
61
- cwd: options.projectDirectoryPath,
62
- });
63
- const formattedData = prettier.format(result.code + os.EOL, prettierConfig);
58
+ const prettierConfig = prettier.resolveConfig.sync(
59
+ options.projectDirectoryPath
60
+ );
61
+ const formattedData = prettier.format(
62
+ result.code + os.EOL,
63
+ prettierConfig ?? undefined
64
+ );
64
65
  fs.writeFileSync(filePath, formattedData, {
65
66
  encoding: 'utf8',
66
67
  });