@pi-r/prettier 0.2.8 → 0.3.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/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2023 Mile Square Park
1
+ Copyright 2023 Studio Trigger
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
4
 
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @pi-r/prettier
2
2
 
3
- PEP 402 - Forever
3
+ PEP 402 - Forever Aina
4
4
 
5
5
  ## LICENSE
6
6
 
package/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- function transform(context, value, options) {
3
+ async function transform(context, value, options) {
4
4
  context = options.upgrade(context, __dirname);
5
5
  const { sourceFile, filename } = options;
6
6
  const baseConfig = options.toBaseConfig();
@@ -12,9 +12,10 @@ function transform(context, value, options) {
12
12
  case 'json5':
13
13
  case 'json-stringify':
14
14
  for (const chunk of options.supplementChunks) {
15
- const result = context.format(value, { ...baseConfig });
15
+ const result = await context.format(value, { ...baseConfig });
16
16
  if (result) {
17
17
  chunk.code = result;
18
+ chunk.sourceMap = undefined;
18
19
  }
19
20
  }
20
21
  break;
@@ -31,6 +32,7 @@ function transform(context, value, options) {
31
32
  case 'mdx':
32
33
  case 'typescript':
33
34
  case 'yaml':
35
+ case 'acorn':
34
36
  case 'espree':
35
37
  case 'glimmer':
36
38
  case 'meriyah':
@@ -41,6 +43,7 @@ function transform(context, value, options) {
41
43
  }
42
44
  break;
43
45
  }
46
+ options.sourceMap.reset();
44
47
  return context.format(value, baseConfig);
45
48
  }
46
49
  exports.default = transform;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-r/prettier",
3
- "version": "0.2.8",
3
+ "version": "0.3.2",
4
4
  "description": "prettier transform function for E-mc.",
5
5
  "main": "index.js",
6
6
  "publishConfig": {
@@ -20,6 +20,6 @@
20
20
  "license": "MIT",
21
21
  "homepage": "https://github.com/anpham6/pi-r#readme",
22
22
  "dependencies": {
23
- "prettier": "^2.8.8"
23
+ "prettier": "^3.2.5"
24
24
  }
25
25
  }