@vue/language-core 1.8.25 → 1.8.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.
@@ -1,4 +1,6 @@
1
- import { VueCodeInformation } from '../types';
1
+ import { Code, CodeAndStack, VueCodeInformation } from '../types';
2
+ export declare function withStack(code: Code): CodeAndStack;
3
+ export declare function getStack(): string;
2
4
  export declare function disableAllFeatures(override: Partial<VueCodeInformation>): VueCodeInformation;
3
5
  export declare function enableAllFeatures(override: Partial<VueCodeInformation>): VueCodeInformation;
4
6
  export declare function mergeFeatureSettings(base: VueCodeInformation, ...others: Partial<VueCodeInformation>[]): VueCodeInformation;
@@ -1,6 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mergeFeatureSettings = exports.enableAllFeatures = exports.disableAllFeatures = void 0;
3
+ exports.mergeFeatureSettings = exports.enableAllFeatures = exports.disableAllFeatures = exports.getStack = exports.withStack = void 0;
4
+ function withStack(code) {
5
+ return [code, getStack()];
6
+ }
7
+ exports.withStack = withStack;
8
+ // TODO: import from muggle-string
9
+ function getStack() {
10
+ const stack = new Error().stack;
11
+ let source = stack.split('\n')[3].trim();
12
+ if (source.endsWith(')')) {
13
+ source = source.slice(source.lastIndexOf('(') + 1, -1);
14
+ }
15
+ else {
16
+ source = source.slice(source.lastIndexOf(' ') + 1);
17
+ }
18
+ return source;
19
+ }
20
+ exports.getStack = getStack;
4
21
  function disableAllFeatures(override) {
5
22
  return {
6
23
  verification: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/language-core",
3
- "version": "1.8.25",
3
+ "version": "1.8.26",
4
4
  "main": "out/index.js",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -37,5 +37,5 @@
37
37
  "optional": true
38
38
  }
39
39
  },
40
- "gitHead": "6f8ca45025b8e38a86f6946bbc294a6a2d88b063"
40
+ "gitHead": "5849cada166bbd3faa03f21efd4d3cc2a2836d11"
41
41
  }