volar-service-prettier 0.0.25 → 0.0.26

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.
Files changed (2) hide show
  1. package/index.js +2 -1
  2. package/package.json +5 -2
package/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.create = void 0;
4
+ const vscode_uri_1 = require("vscode-uri");
4
5
  function create(options = {}, getPrettierConfig = async (filePath, prettier, config) => {
5
6
  return await prettier.resolveConfig(filePath, config) ?? {};
6
7
  }) {
@@ -22,7 +23,7 @@ function create(options = {}, getPrettierConfig = async (filePath, prettier, con
22
23
  if (!languages.includes(document.languageId)) {
23
24
  return;
24
25
  }
25
- const filePath = context.env.uriToFileName(document.uri);
26
+ const filePath = vscode_uri_1.URI.parse(document.uri).fsPath;
26
27
  const fileInfo = await prettier.getFileInfo(filePath, { ignorePath: '.prettierignore', resolveConfig: false });
27
28
  if (fileInfo.ignored) {
28
29
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "volar-service-prettier",
3
- "version": "0.0.25",
3
+ "version": "0.0.26",
4
4
  "description": "Integrate Prettier into Volar",
5
5
  "homepage": "https://github.com/volarjs/services/tree/master/packages/prettier",
6
6
  "bugs": "https://github.com/volarjs/services/issues",
@@ -24,6 +24,9 @@
24
24
  "email": "polv@polv.cc",
25
25
  "url": "https://www.polv.cc"
26
26
  },
27
+ "dependencies": {
28
+ "vscode-uri": "^3.0.8"
29
+ },
27
30
  "devDependencies": {
28
31
  "@types/node": "latest",
29
32
  "prettier": "^3.0.3"
@@ -40,5 +43,5 @@
40
43
  "optional": true
41
44
  }
42
45
  },
43
- "gitHead": "d8838f4288d4836a8829a458855f557d58732963"
46
+ "gitHead": "876051c97aedf04531033784019b4344cdd48881"
44
47
  }