@pi-r/prettier 0.7.2 → 0.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/README.md +1 -1
- package/index.js +4 -2
- package/package.json +4 -4
package/README.md
CHANGED
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
async function transform(context, value, options) {
|
|
3
3
|
context = options.upgrade(context, __dirname);
|
|
4
4
|
const { sourceFile, filename } = options;
|
|
5
5
|
const baseConfig = options.toBaseConfig();
|
|
@@ -9,6 +9,7 @@ module.exports = async function transform(context, value, options) {
|
|
|
9
9
|
case 'babel-ts':
|
|
10
10
|
case 'json':
|
|
11
11
|
case 'json5':
|
|
12
|
+
case 'jsonc':
|
|
12
13
|
case 'json-stringify':
|
|
13
14
|
for (const chunk of options.supplementChunks) {
|
|
14
15
|
const result = await context.format(value, { ...baseConfig });
|
|
@@ -44,4 +45,5 @@ module.exports = async function transform(context, value, options) {
|
|
|
44
45
|
}
|
|
45
46
|
options.sourceMap.reset();
|
|
46
47
|
return context.format(value, baseConfig);
|
|
47
|
-
}
|
|
48
|
+
}
|
|
49
|
+
module.exports = transform;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-r/prettier",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.8.0",
|
|
4
|
+
"description": "Prettier transform function for E-mc.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "git+https://github.com/anpham6/pi-r.git",
|
|
12
|
-
"directory": "src/
|
|
12
|
+
"directory": "src/document/prettier"
|
|
13
13
|
},
|
|
14
14
|
"keywords": [
|
|
15
15
|
"squared",
|
|
@@ -20,6 +20,6 @@
|
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"homepage": "https://github.com/anpham6/pi-r#readme",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"prettier": "^3.3.
|
|
23
|
+
"prettier": "^3.3.3"
|
|
24
24
|
}
|
|
25
25
|
}
|