@commercetools-frontend/create-mc-app 21.3.0 → 21.8.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 +41 -0
- package/LICENSE +1 -1
- package/README.md +1 -1
- package/package.json +4 -4
- package/src/tasks/install-dependencies.js +1 -1
- package/src/tasks/update-application-constants.js +7 -1
- package/src/validations.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,46 @@
|
|
|
1
1
|
# @commercetools-frontend/create-mc-app
|
|
2
2
|
|
|
3
|
+
## 21.8.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#2615](https://github.com/commercetools/merchant-center-application-kit/pull/2615) [`d6bfecf1`](https://github.com/commercetools/merchant-center-application-kit/commit/d6bfecf17c0a6a38330943cc5f195f1854248770) Thanks [@kark](https://github.com/kark)! - There is a new starter template to develop Custom Applications in TypeScript!
|
|
8
|
+
|
|
9
|
+
To install it via the `@commercetools-frontend/create-mc-app` CLI:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
$ npx @commercetools-frontend/create-mc-app@latest <folder_name> \
|
|
13
|
+
--template starter-typescript
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
The TypeScript starter template is the same as the standard JS starter template in terms of functionality
|
|
17
|
+
but it includes the additional TypeScript setup.
|
|
18
|
+
|
|
19
|
+
If you already have a Custom Application in TypeScript or are planning to migrate an existing one to it
|
|
20
|
+
we recommend to take a look at the tooling setup of the TypeScript starter template, in particular:
|
|
21
|
+
|
|
22
|
+
- `.prettierrc` for using the `typescript` parser.
|
|
23
|
+
- `jest.*.config.js` to include the file extensions `.ts` and `.tsx`.
|
|
24
|
+
- `tsconfig.json`
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- [#2661](https://github.com/commercetools/merchant-center-application-kit/pull/2661) [`43a9df21`](https://github.com/commercetools/merchant-center-application-kit/commit/43a9df2193000b49a0299c02d5218c50d71567ed) Thanks [@emmenko](https://github.com/emmenko)! - Drop the copyright year from the license files
|
|
29
|
+
|
|
30
|
+
* [#2676](https://github.com/commercetools/merchant-center-application-kit/pull/2676) [`d691e60a`](https://github.com/commercetools/merchant-center-application-kit/commit/d691e60a0b884a4b0f9b7b7cf3f019b025583577) Thanks [@emmenko](https://github.com/emmenko)! - Fix file formatting when patching constants file
|
|
31
|
+
|
|
32
|
+
## 21.6.0
|
|
33
|
+
|
|
34
|
+
### Patch Changes
|
|
35
|
+
|
|
36
|
+
- [#2555](https://github.com/commercetools/merchant-center-application-kit/pull/2555) [`0b7a3743`](https://github.com/commercetools/merchant-center-application-kit/commit/0b7a3743207172ace7f2b6893b9c7d61c351967b) Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps): update all dependencies
|
|
37
|
+
|
|
38
|
+
## 21.3.4
|
|
39
|
+
|
|
40
|
+
### Patch Changes
|
|
41
|
+
|
|
42
|
+
- [#2546](https://github.com/commercetools/merchant-center-application-kit/pull/2546) [`dc76e5a9`](https://github.com/commercetools/merchant-center-application-kit/commit/dc76e5a9a7f875dadf2ed5a11c48a1ddff7b431c) Thanks [@renovate](https://github.com/apps/renovate)! - Upgrade dependencies
|
|
43
|
+
|
|
3
44
|
## 21.3.0
|
|
4
45
|
|
|
5
46
|
### Patch Changes
|
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -14,5 +14,5 @@ $ create-mc-app my-new-custom-application-project --template starter
|
|
|
14
14
|
|
|
15
15
|
# or
|
|
16
16
|
|
|
17
|
-
$ npx @commercetools-frontend/create-mc-app my-new-custom-application-project --template starter
|
|
17
|
+
$ npx @commercetools-frontend/create-mc-app@latest my-new-custom-application-project --template starter
|
|
18
18
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend/create-mc-app",
|
|
3
|
-
"version": "21.
|
|
3
|
+
"version": "21.8.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": {
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
},
|
|
17
17
|
"bin": "./bin/cli.js",
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@babel/core": "^7.17.
|
|
19
|
+
"@babel/core": "^7.17.9",
|
|
20
20
|
"execa": "5.1.1",
|
|
21
21
|
"listr": "0.14.3",
|
|
22
22
|
"mri": "1.2.0",
|
|
23
|
-
"prettier": "2.6.
|
|
23
|
+
"prettier": "2.6.2",
|
|
24
24
|
"rcfile": "1.0.3",
|
|
25
|
-
"semver": "7.3.
|
|
25
|
+
"semver": "7.3.7"
|
|
26
26
|
},
|
|
27
27
|
"engines": {
|
|
28
28
|
"node": "14.x || 16.x || 17.x"
|
|
@@ -3,7 +3,7 @@ const { shouldUseYarn } = require('../utils');
|
|
|
3
3
|
|
|
4
4
|
module.exports = function installDependencies(options) {
|
|
5
5
|
return {
|
|
6
|
-
title: 'Installing dependencies',
|
|
6
|
+
title: 'Installing dependencies (this might take a while)',
|
|
7
7
|
task: () => {
|
|
8
8
|
const useYarn = shouldUseYarn();
|
|
9
9
|
const packageManager = useYarn ? 'yarn' : 'npm';
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
const os = require('os');
|
|
2
2
|
const fs = require('fs');
|
|
3
3
|
const path = require('path');
|
|
4
|
+
const rcfile = require('rcfile');
|
|
5
|
+
const prettier = require('prettier');
|
|
4
6
|
const babel = require('@babel/core');
|
|
5
7
|
const { resolveFilePathByExtension } = require('../utils');
|
|
6
8
|
|
|
@@ -24,7 +26,11 @@ function replaceEntryPointUriPathInConstants(filePath, options) {
|
|
|
24
26
|
retainLines: true,
|
|
25
27
|
});
|
|
26
28
|
|
|
27
|
-
|
|
29
|
+
const prettierConfig = rcfile('prettier', {
|
|
30
|
+
cwd: options.projectDirectoryPath,
|
|
31
|
+
});
|
|
32
|
+
const formattedData = prettier.format(result.code + os.EOL, prettierConfig);
|
|
33
|
+
fs.writeFileSync(filePath, formattedData, {
|
|
28
34
|
encoding: 'utf8',
|
|
29
35
|
});
|
|
30
36
|
}
|
package/src/validations.js
CHANGED
|
@@ -2,7 +2,7 @@ const fs = require('fs');
|
|
|
2
2
|
const path = require('path');
|
|
3
3
|
const { isSemVer } = require('./utils');
|
|
4
4
|
|
|
5
|
-
const availableTemplates = ['starter'];
|
|
5
|
+
const availableTemplates = ['starter', 'starter-typescript'];
|
|
6
6
|
|
|
7
7
|
const throwIfTemplateIsNotSupported = (templateName) => {
|
|
8
8
|
if (!availableTemplates.includes(templateName)) {
|