Skip to content

Commit

Permalink
chore(npm): Upgrade packages
Browse files Browse the repository at this point in the history
  • Loading branch information
rkunev committed Apr 19, 2020
1 parent 64fd226 commit 845ac89
Show file tree
Hide file tree
Showing 8 changed files with 5,738 additions and 6,135 deletions.
73 changes: 36 additions & 37 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,43 +22,43 @@
"nuxt"
],
"dependencies": {
"@radial-color-picker/color-wheel": "2.2.0",
"@radial-color-picker/rotator": "2.1.0"
"@radial-color-picker/color-wheel": "2.2.1",
"@radial-color-picker/rotator": "2.1.1"
},
"devDependencies": {
"@babel/core": "7.4.5",
"@vue/babel-preset-app": "3.8.0",
"@vue/cli-plugin-babel": "3.8.0",
"@vue/cli-plugin-eslint": "3.8.0",
"@vue/cli-plugin-unit-jest": "3.8.0",
"@vue/cli-service": "3.8.4",
"@vue/cli-shared-utils": "3.8.0",
"@vue/eslint-config-prettier": "4.0.1",
"@vue/test-utils": "1.0.0-beta.29",
"@babel/core": "7.9.0",
"@rollup/plugin-commonjs": "11.1.0",
"@rollup/plugin-node-resolve": "7.1.3",
"@vue/babel-preset-app": "4.3.1",
"@vue/cli-plugin-babel": "4.3.1",
"@vue/cli-plugin-eslint": "4.3.1",
"@vue/cli-plugin-unit-jest": "4.3.1",
"@vue/cli-service": "4.3.1",
"@vue/cli-shared-utils": "4.3.1",
"@vue/eslint-config-prettier": "6.0.0",
"@vue/test-utils": "1.0.0-beta.33",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "10.0.2",
"babel-jest": "24.8.0",
"bundlesize": "0.17.2",
"cliui": "5.0.0",
"eslint": "5.16.0",
"eslint-plugin-prettier": "3.1.0",
"eslint-plugin-vue": "5.2.2",
"fs-extra": "8.0.1",
"lint-staged": "8.2.1",
"postcss": "7.0.17",
"prettier": "1.18.2",
"rollup": "1.15.6",
"rollup-plugin-babel": "4.3.2",
"rollup-plugin-commonjs": "10.0.0",
"rollup-plugin-node-resolve": "5.0.3",
"rollup-plugin-postcss": "2.0.3",
"babel-eslint": "10.1.0",
"babel-jest": "25.3.0",
"bundlesize": "0.18.0",
"cliui": "6.0.0",
"eslint": "6.8.0",
"eslint-plugin-prettier": "3.1.3",
"eslint-plugin-vue": "6.2.2",
"fs-extra": "9.0.0",
"lint-staged": "10.1.6",
"postcss": "7.0.27",
"prettier": "2.0.4",
"rollup": "2.6.1",
"rollup-plugin-babel": "4.4.0",
"rollup-plugin-postcss": "2.8.2",
"rollup-plugin-replace": "2.2.0",
"rollup-plugin-terser": "5.0.0",
"rollup-plugin-vue": "5.0.0",
"vue": "2.5.21",
"vue-server-renderer": "2.5.21",
"vue-template-compiler": "2.5.21",
"vuepress": "1.0.1"
"rollup-plugin-terser": "5.3.0",
"rollup-plugin-vue": "5.1.6",
"vue": "2.6.11",
"vue-server-renderer": "2.6.11",
"vue-template-compiler": "2.6.11",
"vuepress": "1.4.1"
},
"peerDependencies": {
"vue": "^2.5.21"
Expand All @@ -83,8 +83,7 @@
"license": "MIT",
"lint-staged": {
"*.{js,vue}": [
"vue-cli-service lint",
"git add"
"vue-cli-service lint"
]
},
"bundlesize": [
Expand All @@ -98,7 +97,7 @@
}
],
"repository": {
"type" : "git",
"url" : "https://github.com/radial-color-picker/vue-color-picker.git"
"type": "git",
"url": "https://github.com/radial-color-picker/vue-color-picker.git"
}
}
1 change: 1 addition & 0 deletions prettier.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ module.exports = {
singleQuote: true,
tabWidth: 4,
trailingComma: 'es5',
arrowParens: 'avoid',
};
13 changes: 7 additions & 6 deletions scripts/roll.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@ const { rollup } = require('rollup');
const vue = require('rollup-plugin-vue');
const babel = require('rollup-plugin-babel');
const replace = require('rollup-plugin-replace');
const cjs = require('rollup-plugin-commonjs');
const nodeResolve = require('rollup-plugin-node-resolve');
const cjs = require('@rollup/plugin-commonjs');
const nodeResolve = require('@rollup/plugin-node-resolve');
const postcss = require('rollup-plugin-postcss');
const { terser } = require('rollup-plugin-terser');

const basePath = 'dist/vue-color-picker';
const fileNameBase = 'vue-color-picker';

const build = async ({ format, minify = false }) => {
const inputOptions = {
input: './src/wrapper.js',
external: ['vue'],
plugins: [
// Replace env variable with 'production' for umd.min.js and 'development' for 'umd.js'
// Leave the process.env.NODE_ENV in CommonJS and ESM builds which are exclusively used only in JS bundlers like Webpack & Rollup
// Leave the process.env.NODE_ENV in CommonJS and ESM builds
// which are exclusively used only in JS bundlers like Webpack & Rollup
format === 'umd' &&
replace({
'process.env.NODE_ENV': JSON.stringify(
Expand All @@ -25,7 +26,7 @@ const build = async ({ format, minify = false }) => {
cjs(),
nodeResolve(),
postcss({
extract: `${basePath}${minify ? '.min' : ''}.css`,
extract: format === 'umd' && `${fileNameBase}${minify ? '.min' : ''}.css`,
inject: false,
minimize: minify,
sourceMap: minify,
Expand Down Expand Up @@ -53,7 +54,7 @@ const build = async ({ format, minify = false }) => {
return bundle.write({
format,
globals: { vue: 'Vue' },
file: `${basePath}.${format}${minify ? '.min' : ''}.js`,
file: `dist/${fileNameBase}.${format}${minify ? '.min' : ''}.js`,
name: 'VueColorPicker',
sourcemap: minify,
});
Expand Down
2 changes: 1 addition & 1 deletion src/ColorPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export default {
},
},
watch: {
hue: function(angle) {
hue: function (angle) {
this.rcp.angle = angle;
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/wrapper.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import ColorPicker from './ColorPicker.vue';

ColorPicker.install = function(Vue) {
ColorPicker.install = function (Vue) {
Vue.component('ColorPicker', ColorPicker);
};

Expand Down
4 changes: 3 additions & 1 deletion tests/unit/__snapshots__/index.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ exports[`Init renders correctly 1`] = `
<div
class="rcp__rotator"
style="transform: rotate(0deg);"
style="transform: rotate(0deg); will-change: transform;"
>
<div
class="rcp__knob in"
Expand All @@ -22,10 +22,12 @@ exports[`Init renders correctly 1`] = `
<div
class="rcp__ripple"
style="border-color: hsla(0, 100%, 50%, 1);"
/>
<button
class="rcp__well"
style="background-color: hsl(0, 100%, 50%);"
type="button"
/>
</div>
Expand Down
6 changes: 4 additions & 2 deletions tests/unit/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ describe('Reactive Changes', () => {
expect(el.vm.color).toBe('hsla(90, 100%, 50%, 1)');
});

it('updates rotator based on hue prop', () => {
it('updates rotator based on hue prop', async () => {
const el = shallowMount(ColorPicker, {
propsData: {
hue: 90,
Expand All @@ -458,7 +458,9 @@ describe('Reactive Changes', () => {

el.setProps({ hue: 60 });

expect(el.vm.rcp.angle).toBe(60);
await el.vm.$nextTick();

expect(el.vm.rcp._angle).toBe(60);
});

it("doesn't mutate the saturation, luminosity or alpha props when hue changes", () => {
Expand Down

0 comments on commit 845ac89

Please sign in to comment.