vue-tsc 1.7.12 → 1.7.14

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/out/index.js +22 -10
  2. package/package.json +4 -4
package/out/index.js CHANGED
@@ -73,24 +73,36 @@ function createProgram(options) {
73
73
  };
74
74
  }
75
75
  }
76
- catch { }
76
+ catch {
77
+ return undefined;
78
+ }
77
79
  }
78
80
  },
79
81
  readFile(uri, encoding) {
80
82
  if (uri.startsWith('file://')) {
81
- return fs.readFileSync(uriToFileName(uri), { encoding: encoding ?? 'utf-8' });
83
+ try {
84
+ return fs.readFileSync(uriToFileName(uri), { encoding: encoding ?? 'utf-8' });
85
+ }
86
+ catch {
87
+ return undefined;
88
+ }
82
89
  }
83
90
  },
84
91
  readDirectory(uri) {
85
92
  if (uri.startsWith('file://')) {
86
- const dirName = uriToFileName(uri);
87
- const files = fs.existsSync(dirName) ? fs.readdirSync(dirName, { withFileTypes: true }) : [];
88
- return files.map(file => {
89
- return [file.name, file.isFile() ? 1
90
- : file.isDirectory() ? 2
91
- : file.isSymbolicLink() ? 64
92
- : 0];
93
- });
93
+ try {
94
+ const dirName = uriToFileName(uri);
95
+ const files = fs.readdirSync(dirName, { withFileTypes: true });
96
+ return files.map(file => {
97
+ return [file.name, file.isFile() ? 1
98
+ : file.isDirectory() ? 2
99
+ : file.isSymbolicLink() ? 64
100
+ : 0];
101
+ });
102
+ }
103
+ catch {
104
+ return [];
105
+ }
94
106
  }
95
107
  return [];
96
108
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-tsc",
3
- "version": "1.7.12",
3
+ "version": "1.7.14",
4
4
  "main": "out/index.js",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -17,13 +17,13 @@
17
17
  "vue-tsc": "./bin/vue-tsc.js"
18
18
  },
19
19
  "dependencies": {
20
- "@vue/language-core": "1.7.12",
21
- "@vue/typescript": "1.7.12",
20
+ "@vue/language-core": "1.7.14",
21
+ "@vue/typescript": "1.7.14",
22
22
  "semver": "^7.3.8",
23
23
  "vscode-uri": "^3.0.7"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "typescript": "*"
27
27
  },
28
- "gitHead": "9e712c2d603c690cd03502f5ec1a99bd80b800ac"
28
+ "gitHead": "a8a05a278ab807590faeafdfd76646f5c41c0443"
29
29
  }