From 46ed3fa3d46dcad40e73637218cec743f72f35d5 Mon Sep 17 00:00:00 2001 From: Michael Dodge Date: Fri, 26 Feb 2021 15:17:24 -0700 Subject: [PATCH] Bump version, update CHANGELOG and README --- CHANGELOG.md | 11 +++++++++++ README.md | 4 ++++ package-lock.json | 2 +- package.json | 8 ++++++-- 4 files changed, 22 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e1884d..8234cd3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [4.0.1] - 2021-02-26 + +### Changed +- Remove optional chaining/nullish coalescing code from demo component + - Webpack 4 (used by vue-cli 4, and vue-cli 5 with cli-plugin-webpack-4) chokes on these, and babel/preset-env no longer transpiles them down. Best to not suggest them in demo components. +- Update README with note about babel/preset-env + +### Known Issues +- Vue 3 tree-shaking is still broken + - Vue 2 is not affected + ## [4.0.0] - 2021-01-07 ### Removed diff --git a/README.md b/README.md index 0c16b2c..b0c862f 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,10 @@ npm run serve This will start up a webpack dev server with hot reloading and all the other awesomeness! +> **_NOTE:_** The code you write in your SFC will be transpiled by babel, allowing you to use of many modern features in your code. Babel is configured with babel/preset-env, so the code transpiled will target the environments specified in your `.browserslistrc` file. You should indicate supported environments in your component/library `README.md` file, as this requirement is passed on to users of your module, including those using bundlers. If this is a concern, you might suggest users add your component to their list of [transpileDependencies](https://cli.vuejs.org/config/#transpiledependencies) list. +> +> It is also possible to [configure babel/preset-env to always apply certain transofmrations](https://babeljs.io/docs/en/babel-preset-env#include) that fall outside those automatically applied. For example, webpack 4 is unable to handle optional chaining and nullish coalescing. Babel/preset-env might indicate it is widely supported by browsers, but build processes still running webpack 4 would crash when encountering this code. + ## Packaging your SFC Once your development is done, it's time to package your component to publish to npm. The actual process of [publishing to npm](https://docs.npmjs.com/getting-started/publishing-npm-packages) is left up to you, but the whole purpose of this project is to compile your SFC/library so that it's packaged and ready to go. diff --git a/package-lock.json b/package-lock.json index 8cb25c6..ab88c4c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "vue-sfc-rollup", - "version": "4.0.0", + "version": "4.0.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 9ea6ab3..56d8c3a 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "description": "Quickly generate redistributable components with Rollup", "author": "Michael Dodge", "license": "ISC", - "version": "4.0.0", + "version": "4.0.1", "bin": { "sfc-init": "./sfc-init.js" }, @@ -23,7 +23,11 @@ "sfc-init.js" ], "scripts": { - "lint": "eslint ./**/*.js ./**/.*.js" + "lint": "eslint ./**/*.js ./**/.*.js", + "version": "npm --no-git-tag-version version", + "version:patch": "npm run version -- patch", + "version:minor": "npm run version -- minor", + "version:major": "npm run version -- major" }, "husky": { "hooks": {