Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-sfc-rollup

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-sfc-rollup - npm Package Compare versions

Comparing version 2.3.1 to 3.0.0

templates/library/dev/serve.ts

31

CHANGELOG.md

@@ -7,2 +7,33 @@ # Changelog

## [3.0.0] - 2020-04-29
### Changed
- **BREAKING CHANGE**: Drop support for node 8
- Update template dependencies
- @babel/core 7.9.0
- @babel/preset-env 7.9.5
- @babel/preset-typescript 7.9.0
- @rollup/plugin-alias 2.2.0
- @rollup/plugin-commonjs 11.1.0
- @rollup/plugin-replace 2.3.2
- @vue/cli-plugin-babel 4.3.1
- @vue/cli-plugin-typescript 4.3.1
- @vue/cli-service 4.3.1
- cross-env 7.0.2
- minimist 1.2.5
- rollup 2.7.3
- rollup-plugin-babel 4.4.0
- rollup-plugin-terser 5.3.0
- rollup-plugin-vue 5.1.6
- typescript 3.8.3
- vue 2.6.11
- vue-template-compiler 2.6.11
### Fixed
- **BREAKING CHANGE**: Remove auto-install logic/output from esm output
- This is _part_ of a bug [#39](https://github.com/team-innovation/vue-sfc-rollup/issues/39), preventing proper tree-shaking of esm builds. Resolution explained [here](https://github.com/webpack/webpack/issues/9614). Related bug reported to rollup-plugin-vue [here](https://github.com/vuejs/rollup-plugin-vue/issues/344).
- Renamed template files `src/serve-dev.{vue|js|ts}` to `dev/serve.{vue|js|ts}`
- Removes need to explicitly ignore it from npm bundle
- Resolves bug [#40](https://github.com/team-innovation/vue-sfc-rollup/issues/39) with yarn and package.json `files` array rules containing negate flag
## [2.3.1] - 2020-01-24

@@ -9,0 +40,0 @@

20

package.json

@@ -6,3 +6,3 @@ {

"license": "ISC",
"version": "2.3.1",
"version": "3.0.0",
"bin": {

@@ -36,16 +36,16 @@ "sfc-init": "./sfc-init.js"

"dependencies": {
"chalk": "^3.0.0",
"ejs": "^2.7.1",
"prompts": "^2.2.1",
"update-check": "^1.5.3"
"chalk": "^4.0.0",
"ejs": "^3.1.2",
"prompts": "^2.3.2",
"update-check": "^1.5.4"
},
"devDependencies": {
"eslint": "^6.6.0",
"eslint-config-airbnb-base": "^14.0.0",
"eslint-plugin-import": "^2.18.2",
"husky": "^3.0.9"
"eslint": "^6.8.0",
"eslint-config-airbnb-base": "^14.1.0",
"eslint-plugin-import": "^2.20.2",
"husky": "^4.2.5"
},
"engines": {
"node": ">=6"
"node": ">=8"
}
}

@@ -174,4 +174,4 @@ #! /usr/bin/env node

{ 'src/entry.ts': `src/entry.${data.language}` },
{ 'src/serve-dev.ts': `src/serve-dev.${data.language}` },
'src/serve-dev.vue',
{ 'dev/serve.ts': `dev/serve.${data.language}` },
'dev/serve.vue',
'.browserslistrc',

@@ -178,0 +178,0 @@ 'babel.config.js',

@@ -26,5 +26,2 @@ // rollup.config.js

preVue: [
replace({
'process.env.NODE_ENV': JSON.stringify('production'),
}),
alias({

@@ -37,2 +34,6 @@ resolve: ['.js', '.jsx', '.ts', '.tsx', '.vue'],

],
replace: {
'process.env.NODE_ENV': JSON.stringify('production'),
'process.env.ES_BUILD': JSON.stringify('false'),
},
vue: {

@@ -79,2 +80,6 @@ css: true,

plugins: [
replace({
...baseConfig.plugins.replace,
'process.env.ES_BUILD': JSON.stringify('true'),
}),
...baseConfig.plugins.preVue,

@@ -112,2 +117,3 @@ vue(baseConfig.plugins.vue),

plugins: [
replace(baseConfig.plugins.replace),
...baseConfig.plugins.preVue,

@@ -141,2 +147,3 @@ vue({

plugins: [
replace(baseConfig.plugins.replace),
...baseConfig.plugins.preVue,

@@ -143,0 +150,0 @@ vue(baseConfig.plugins.vue),

@@ -19,8 +19,7 @@ {

<% } -%>
"src/**/*.vue",
"!src/serve-dev.*"
"src/**/*.vue"
],
"scripts": {
"serve": "vue-cli-service serve src/serve-dev.<% if (ts) { %>ts<% } else { %>js<% } %>",
"serve": "vue-cli-service serve dev/serve.<% if (ts) { %>ts<% } else { %>js<% } %>",
"build": "cross-env NODE_ENV=production rollup --config build/rollup.config.js",

@@ -36,33 +35,33 @@ "build:ssr": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format cjs",

"devDependencies": {
"@babel/core": "^7.7.7",
"@babel/preset-env": "^7.7.7",
"@babel/core": "^7.9.0",
"@babel/preset-env": "^7.9.5",
<% if (ts) { -%>
"@babel/preset-typescript": "^7.7.7",
"@babel/preset-typescript": "^7.9.0",
<% } -%>
"@rollup/plugin-alias": "^2.2.0",
"@rollup/plugin-commonjs": "^11.0.1",
"@rollup/plugin-replace": "^2.2.1",
"@vue/cli-plugin-babel": "^4.1.0",
"@rollup/plugin-commonjs": "^11.1.0",
"@rollup/plugin-replace": "^2.3.2",
"@vue/cli-plugin-babel": "^4.3.1",
<% if (ts) { -%>
"@vue/cli-plugin-typescript": "^4.1.0",
"@vue/cli-plugin-typescript": "^4.3.1",
<% } -%>
"@vue/cli-service": "^4.1.0",
"cross-env": "^6.0.3",
"minimist": "^1.2.0",
"rollup": "^1.27.13",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-terser": "^5.1.3",
"rollup-plugin-vue": "^5.1.5",
"@vue/cli-service": "^4.3.1",
"cross-env": "^7.0.2",
"minimist": "^1.2.5",
"rollup": "^2.7.3",
"rollup-plugin-babel": "^4.4.0",
"rollup-plugin-terser": "^5.3.0",
"rollup-plugin-vue": "^5.1.6",
<% if (ts) { -%>
"typescript": "^3.7.3",
"typescript": "^3.8.3",
<% } -%>
"vue": "^2.6.10",
"vue-template-compiler": "^2.6.10"
"vue": "^2.6.11",
"vue-template-compiler": "^2.6.11"
},
"peerDependencies": {
"vue": "^2.6.10"
"vue": "^2.6.11"
},
"engines": {
"node": ">=8"
"node": ">=10"
}
}

@@ -34,24 +34,25 @@ <% if (ts) { -%>

// To auto-install when vue is found
// To auto-install on non-es builds, when vue is found
// eslint-disable-next-line no-redeclare
/* global window, global */
let GlobalVue = null;
if (typeof window !== 'undefined') {
GlobalVue = window.Vue;
} else if (typeof global !== 'undefined') {
if ('false' === process.env.ES_BUILD) {
let GlobalVue = null;
if (typeof window !== 'undefined') {
GlobalVue = window.Vue;
} else if (typeof global !== 'undefined') {
<% if (ts) { -%>
// eslint-disable-next-line @typescript-eslint/no-explicit-any
GlobalVue = (global as any).Vue;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
GlobalVue = (global as any).Vue;
<% } else { -%>
GlobalVue = global.Vue;
GlobalVue = global.Vue;
<% } -%>
}
if (GlobalVue) {
}
if (GlobalVue) {
<% if (ts) { -%>
(GlobalVue as typeof _Vue).use(plugin);
(GlobalVue as typeof _Vue).use(plugin);
<% } else { -%>
GlobalVue.use(plugin);
GlobalVue.use(plugin);
<% } -%>
}
}
// Default export is library as a whole, registered via Vue.use()

@@ -58,0 +59,0 @@ export default plugin;

@@ -26,5 +26,2 @@ // rollup.config.js

preVue: [
replace({
'process.env.NODE_ENV': JSON.stringify('production'),
}),
alias({

@@ -37,2 +34,6 @@ resolve: ['.js', '.jsx', '.ts', '.tsx', '.vue'],

],
replace: {
'process.env.NODE_ENV': JSON.stringify('production'),
'process.env.ES_BUILD': JSON.stringify('false'),
},
vue: {

@@ -79,2 +80,6 @@ css: true,

plugins: [
replace({
...baseConfig.plugins.replace,
'process.env.ES_BUILD': JSON.stringify('true'),
}),
...baseConfig.plugins.preVue,

@@ -112,2 +117,3 @@ vue(baseConfig.plugins.vue),

plugins: [
replace(baseConfig.plugins.replace),
...baseConfig.plugins.preVue,

@@ -141,2 +147,3 @@ vue({

plugins: [
replace(baseConfig.plugins.replace),
...baseConfig.plugins.preVue,

@@ -143,0 +150,0 @@ vue(baseConfig.plugins.vue),

@@ -19,8 +19,7 @@ {

<% } -%>
"src/**/*.vue",
"!src/serve-dev.*"
"src/**/*.vue"
],
"scripts": {
"serve": "vue-cli-service serve src/serve-dev.<% if (ts) { %>ts<% } else { %>js<% } %>",
"serve": "vue-cli-service serve dev/serve.<% if (ts) { %>ts<% } else { %>js<% } %>",
"build": "cross-env NODE_ENV=production rollup --config build/rollup.config.js",

@@ -36,33 +35,33 @@ "build:ssr": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format cjs",

"devDependencies": {
"@babel/core": "^7.7.7",
"@babel/preset-env": "^7.7.7",
"@babel/core": "^7.9.0",
"@babel/preset-env": "^7.9.5",
<% if (ts) { -%>
"@babel/preset-typescript": "^7.7.7",
"@babel/preset-typescript": "^7.9.0",
<% } -%>
"@rollup/plugin-alias": "^2.2.0",
"@rollup/plugin-commonjs": "^11.0.1",
"@rollup/plugin-replace": "^2.2.1",
"@vue/cli-plugin-babel": "^4.1.0",
"@rollup/plugin-commonjs": "^11.1.0",
"@rollup/plugin-replace": "^2.3.2",
"@vue/cli-plugin-babel": "^4.3.1",
<% if (ts) { -%>
"@vue/cli-plugin-typescript": "^4.1.0",
"@vue/cli-plugin-typescript": "^4.3.1",
<% } -%>
"@vue/cli-service": "^4.1.0",
"cross-env": "^6.0.3",
"minimist": "^1.2.0",
"rollup": "^1.27.13",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-terser": "^5.1.3",
"rollup-plugin-vue": "^5.1.5",
"@vue/cli-service": "^4.3.1",
"cross-env": "^7.0.2",
"minimist": "^1.2.5",
"rollup": "^2.7.3",
"rollup-plugin-babel": "^4.4.0",
"rollup-plugin-terser": "^5.3.0",
"rollup-plugin-vue": "^5.1.6",
<% if (ts) { -%>
"typescript": "^3.7.3",
"typescript": "^3.8.3",
<% } -%>
"vue": "^2.6.10",
"vue-template-compiler": "^2.6.10"
"vue": "^2.6.11",
"vue-template-compiler": "^2.6.11"
},
"peerDependencies": {
"vue": "^2.6.10"
"vue": "^2.6.11"
},
"engines": {
"node": ">=8"
"node": ">=10"
}
}

@@ -35,22 +35,24 @@ <% if (ts) { -%>

// To auto-install when vue is found
// To auto-install on non-es builds, when vue is found
// eslint-disable-next-line no-redeclare
/* global window, global */
let GlobalVue = null;
if (typeof window !== 'undefined') {
GlobalVue = window.Vue;
} else if (typeof global !== 'undefined') {
if ('false' === process.env.ES_BUILD) {
let GlobalVue = null;
if (typeof window !== 'undefined') {
GlobalVue = window.Vue;
} else if (typeof global !== 'undefined') {
<% if (ts) { -%>
// eslint-disable-next-line @typescript-eslint/no-explicit-any
GlobalVue = (global as any).Vue;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
GlobalVue = (global as any).Vue;
<% } else { -%>
GlobalVue = global.Vue;
GlobalVue = global.Vue;
<% } -%>
}
if (GlobalVue) {
}
if (GlobalVue) {
<% if (ts) { -%>
(GlobalVue as typeof _Vue).use(plugin);
(GlobalVue as typeof _Vue).use(plugin);
<% } else { -%>
GlobalVue.use(plugin);
GlobalVue.use(plugin);
<% } -%>
}
}

@@ -57,0 +59,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc