@strapi/typescript-utils 5.0.0-beta.1 → 5.0.0-beta.2
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/generators/utils.js +3 -1
- package/package.json +3 -3
package/lib/generators/utils.js
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
const path = require('path');
|
|
4
4
|
const assert = require('assert');
|
|
5
5
|
const ts = require('typescript');
|
|
6
|
-
const prettier = require('prettier');
|
|
7
6
|
const fse = require('fs-extra');
|
|
8
7
|
const chalk = require('chalk');
|
|
9
8
|
|
|
@@ -61,6 +60,9 @@ const saveDefinitionToFileSystem = async (dir, file, content) => {
|
|
|
61
60
|
* @returns {Promise<string>}
|
|
62
61
|
*/
|
|
63
62
|
const format = async (content) => {
|
|
63
|
+
// eslint-disable-next-line node/no-unsupported-features/es-syntax
|
|
64
|
+
const prettier = await import('prettier'); // ESM-only
|
|
65
|
+
|
|
64
66
|
const configFile = await prettier.resolveConfigFile();
|
|
65
67
|
const config = configFile
|
|
66
68
|
? await prettier.resolveConfig(configFile)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strapi/typescript-utils",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.2",
|
|
4
4
|
"description": "Typescript support for Strapi",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"strapi",
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
"cli-table3": "0.6.2",
|
|
40
40
|
"fs-extra": "10.1.0",
|
|
41
41
|
"lodash": "4.17.21",
|
|
42
|
-
"prettier": "2.
|
|
42
|
+
"prettier": "3.2.5",
|
|
43
43
|
"typescript": "5.3.2"
|
|
44
44
|
},
|
|
45
45
|
"engines": {
|
|
46
46
|
"node": ">=18.0.0 <=20.x.x",
|
|
47
47
|
"npm": ">=6.0.0"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "e39426bd12ead73ca35d3d9bbf6dc71b5e8ac354"
|
|
50
50
|
}
|