vue-component-meta 3.1.1 → 3.1.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/base.js CHANGED
@@ -169,8 +169,13 @@ function baseCreate(ts, getConfigAndFiles, checkerOptions, rootPath, globalCompo
169
169
  : fileName.slice(0, fileName.lastIndexOf('.'))) + '.meta.ts';
170
170
  }
171
171
  function getMetaScriptContent(fileName) {
172
+ const helpersPath = require.resolve('vue-component-type-helpers').replace(windowsPathReg, '/');
173
+ let helpersRelativePath = path_browserify_1.posix.relative(path_browserify_1.posix.dirname(fileName), helpersPath);
174
+ if (!helpersRelativePath.startsWith('./') && !helpersRelativePath.startsWith('../')) {
175
+ helpersRelativePath = './' + helpersRelativePath;
176
+ }
172
177
  let code = `
173
- import type { ComponentType, ComponentProps, ComponentEmit, ComponentSlots, ComponentExposed } from 'vue-component-meta/lib/helpers';
178
+ import type { ComponentType, ComponentProps, ComponentEmit, ComponentSlots, ComponentExposed } from '${helpersRelativePath}';
174
179
  import type * as Components from '${fileName.slice(0, -'.meta.ts'.length)}';
175
180
 
176
181
  export default {} as { [K in keyof typeof Components]: ComponentMeta<typeof Components[K]>; };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-component-meta",
3
- "version": "3.1.1",
3
+ "version": "3.1.2",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "**/*.js",
@@ -14,9 +14,9 @@
14
14
  },
15
15
  "dependencies": {
16
16
  "@volar/typescript": "2.4.23",
17
- "@vue/language-core": "3.1.1",
17
+ "@vue/language-core": "3.1.2",
18
18
  "path-browserify": "^1.0.1",
19
- "vue-component-type-helpers": "3.1.1"
19
+ "vue-component-type-helpers": "3.1.2"
20
20
  },
21
21
  "peerDependencies": {
22
22
  "typescript": "*"
@@ -25,5 +25,5 @@
25
25
  "@types/node": "^22.10.4",
26
26
  "@types/path-browserify": "^1.0.1"
27
27
  },
28
- "gitHead": "3ea27dacce47613f49ae83e96e3aa271ee54746e"
28
+ "gitHead": "77db3d889305e8c02740f4c14793bff0156ccdb8"
29
29
  }
package/lib/helpers.d.ts DELETED
@@ -1 +0,0 @@
1
- export type * from 'vue-component-type-helpers';
package/lib/helpers.js DELETED
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=helpers.js.map