diff --git a/e2e/2.x/babel-in-package/package.json b/e2e/2.x/babel-in-package/package.json index 55dcde43..b9ebc577 100644 --- a/e2e/2.x/babel-in-package/package.json +++ b/e2e/2.x/babel-in-package/package.json @@ -8,8 +8,8 @@ }, "dependencies": { "source-map": "0.5.6", - "vue": "^2.5.21", - "vue-template-compiler": "^2.5.21" + "vue": "^2.7.7", + "vue-template-compiler": "^2.7.7" }, "devDependencies": { "@babel/core": "^7.9.0", diff --git a/e2e/2.x/basic/__snapshots__/test.js.snap b/e2e/2.x/basic/__snapshots__/test.js.snap index f7f217d9..018258ad 100644 --- a/e2e/2.x/basic/__snapshots__/test.js.snap +++ b/e2e/2.x/basic/__snapshots__/test.js.snap @@ -3,7 +3,7 @@ exports[`generates source maps for .vue files 1`] = ` { "file": "./components/Basic.vue", - "mappings": ";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;eAEe;AACbA,MAAI,EAAE,OADO;AAEbC,UAAQ,EAAE;AACRC,kBAAc,EAAE,SAASA,cAAT,GAA0B;AACxC,aAAO;AACLC,WAAG,EAAE,KAAKC,OADL;AAELC,YAAI,EAAE,CAAC,KAAKD,OAFP;AAGLE,cAAM,EAAE,KAAKF;AAHR,OAAP;AAKD;AAPO,GAFG;AAWbG,MAAI,EAAE,SAASA,IAAT,GAAgB;AACpB,WAAO;AACLC,SAAG,EAAE,4BADA;AAELJ,aAAO,EAAE;AAFJ,KAAP;AAID,GAhBY;AAiBbK,SAAO,EAAE;AACPC,eAAW,EAAE,SAASA,WAAT,GAAuB;AAClC,WAAKN,OAAL,GAAe,CAAC,KAAKA,OAArB;AACD;AAHM;AAjBI,C", + "mappings": ";;;;;;eACe;AACbA,MAAI,EAAE,OADO;AAEbC,UAAQ,EAAE;AACRC,kBAAc,EAAE,SAASA,cAAT,GAA0B;AACxC,aAAO;AACLC,WAAG,EAAE,KAAKC,OADL;AAELC,YAAI,EAAE,CAAC,KAAKD,OAFP;AAGLE,cAAM,EAAE,KAAKF;AAHR,OAAP;AAKD;AAPO,GAFG;AAWbG,MAAI,EAAE,SAASA,IAAT,GAAgB;AACpB,WAAO;AACLC,SAAG,EAAE,4BADA;AAELJ,aAAO,EAAE;AAFJ,KAAP;AAID,GAhBY;AAiBbK,SAAO,EAAE;AACPC,eAAW,EAAE,SAASA,WAAT,GAAuB;AAClC,WAAKN,OAAL,GAAe,CAAC,KAAKA,OAArB;AACD;AAHM;AAjBI,C", "names": [ "name", "computed", @@ -21,29 +21,7 @@ exports[`generates source maps for .vue files 1`] = ` "Basic.vue", ], "sourcesContent": [ - "// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// - + " export default { name: 'basic', computed: { diff --git a/e2e/2.x/basic/components/ScriptSetup.vue b/e2e/2.x/basic/components/ScriptSetup.vue new file mode 100644 index 00000000..6c413862 --- /dev/null +++ b/e2e/2.x/basic/components/ScriptSetup.vue @@ -0,0 +1,20 @@ + + + diff --git a/e2e/2.x/basic/package.json b/e2e/2.x/basic/package.json index a657c3ec..152b804c 100644 --- a/e2e/2.x/basic/package.json +++ b/e2e/2.x/basic/package.json @@ -7,8 +7,8 @@ "test": "jest --no-cache --coverage test.js" }, "dependencies": { - "vue": "^2.5.21", - "vue-template-compiler": "^2.5.21" + "vue": "^2.7.7", + "vue-template-compiler": "^2.7.7" }, "devDependencies": { "@babel/core": "^7.9.0", diff --git a/e2e/2.x/basic/test.js b/e2e/2.x/basic/test.js index c81e3292..7ec85043 100644 --- a/e2e/2.x/basic/test.js +++ b/e2e/2.x/basic/test.js @@ -20,6 +20,7 @@ import PugRelative from './components/PugRelativeExtends.vue' import Jsx from './components/Jsx.vue' import Constructor from './components/Constructor.vue' import { compileStyle } from '@vue/component-compiler-utils' +import ScriptSetup from './components/ScriptSetup' jest.mock('@vue/component-compiler-utils', () => ({ ...jest.requireActual('@vue/component-compiler-utils'), compileStyle: jest.fn(() => ({ errors: [], code: '' })) @@ -156,6 +157,12 @@ test('processes SFC with no template', () => { expect(wrapper.element.tagName).toBe('SECTION') }) +test('processes SFC with