Update dependencies

This commit is contained in:
The Jared Wilcurt 2020-02-19 12:49:31 -05:00 committed by GitHub
commit 812c3a1edd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 1677 additions and 4218 deletions

View File

@ -1 +1 @@
chrome 79
chrome 80

View File

@ -6,9 +6,11 @@ NW.js + Vue-CLI 4 example
![A screenshot of the default app running on Windows](screenshot.png)
* NW.js
* Vue-CLI 4
* Vue 2.6
* NW.js 0.44.2
* Chrome 80
* Node 13.8.0
* Vue-CLI 4.2.2
* Vue 2.6.11
* Vue-DevTools (latest)
* Babel
* ESLint
@ -88,5 +90,6 @@ This is not for those *using* this repo, but for those *maintaining* it.
* `tests/unit/setup.js`
* `tests/unit/components/__snapshots__/HelloWorld.test.js.snap`
* `.browserslistrc`
1. Update the version numbers at the top of the README
1. Bump the version number, and all the npm scripts that reference the version number
1. Run `npm run regression` after updating dependencies or other major changes to verify builds still work correctly

View File

@ -1,5 +1,5 @@
module.exports = {
presets: [
'@vue/app'
'@vue/cli-plugin-babel/preset'
]
};

View File

@ -2,45 +2,18 @@ process.env.VUE_CLI_BABEL_TARGET_NODE = true;
process.env.VUE_CLI_BABEL_TRANSPILE_MODULES = true;
module.exports = {
collectCoverageFrom: [
'src/**/*.{js,vue}',
'!src/main.js',
'!**/node_modules/**'
],
preset: '@vue/cli-plugin-unit-jest',
coverageDirectory: '<rootDir>/tests/unit/coverage',
moduleFileExtensions: [
'js',
'jsx',
'json',
'vue'
],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1'
},
setupFilesAfterEnv: [
'<rootDir>/tests/unit/setup.js'
],
snapshotSerializers: [
'<rootDir>/node_modules/jest-serializer-vue-tjw'
],
testEnvironment: 'jest-environment-jsdom-global',
testMatch: [
'**/tests/unit/**/*.test.js'
],
testPathIgnorePatterns: [
'<rootDir>/tests/e2e'
],
testURL: 'http://localhost/',
transform: {
'^.+\\.vue$': 'vue-jest',
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub',
'^.+\\.jsx?$': 'babel-jest'
},
transformIgnorePatterns: [
'/node_modules/'
],
watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname'
]
};

5767
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -6,7 +6,7 @@
"To turn spell checking off, remove it from the chromium-args in this file"
],
"name": "nw-vue",
"version": "1.4.0",
"version": "1.5.0",
"main": "http://localhost:8964",
"node-remote": "http://localhost:8964",
"node-main": "",
@ -27,10 +27,10 @@
"build:nw": "build --concurrent --tasks win-x86,linux-x86,linux-x64,mac-x64 --mirror https://dl.nwjs.io/ .",
"build:win": "npm run build:win:clean && npm run build:vue && build --tasks win-x86 --mirror https://dl.nwjs.io/ .",
"build:lin": "npm run build:lin:clean && npm run build:vue && build --tasks linux-x64 --mirror https://dl.nwjs.io/ .",
"build:win:clean": "rimraf ./dist-vue ./dist/nw-vue-1.4.0-win-x86 ./dist/nw-vue-1.4.0-win-x86.zip ./dist/nw-vue-1.4.0-win-x86.7z ./dist/nw-vue-1.4.0-win-x86-Setup.exe",
"build:lin:clean": "rimraf ./dist-vue ./dist/nw-vue-1.4.0-linux-x64 ./dist/nw-vue-1.4.0-linux-x64.zip",
"run:win": "dist\\nw-vue-1.4.0-win-x86\\nw-vue.exe",
"run:lin": "./dist/nw-vue-1.4.0-linux-x64/nw-vue",
"build:win:clean": "rimraf ./dist-vue ./dist/nw-vue-1.5.0-win-x86 ./dist/nw-vue-1.5.0-win-x86.zip ./dist/nw-vue-1.5.0-win-x86.7z ./dist/nw-vue-1.5.0-win-x86-Setup.exe",
"build:lin:clean": "rimraf ./dist-vue ./dist/nw-vue-1.5.0-linux-x64 ./dist/nw-vue-1.5.0-linux-x64.zip",
"run:win": "dist\\nw-vue-1.5.0-win-x86\\nw-vue.exe",
"run:lin": "./dist/nw-vue-1.5.0-linux-x64/nw-vue",
"regression": "rd /s /q node_modules & rd /s /q node_modules & rd /s /q node_modules & npm install && npm run lint && npm test && npm run build:win && npm run run:win",
"lint": "vue-cli-service lint --no-fix",
"fix": "vue-cli-service lint --fix",
@ -44,46 +44,34 @@
"express": "^4.17.1"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.1.2",
"@vue/cli-plugin-e2e-nightwatch": "^4.1.2",
"@vue/cli-plugin-eslint": "^4.1.2",
"@vue/cli-plugin-unit-jest": "^4.1.2",
"@vue/cli-service": "^4.1.2",
"@vue/test-utils": "1.0.0-beta.29",
"babel-core": "7.0.0-bridge.0",
"@vue/cli-plugin-babel": "^4.2.2",
"@vue/cli-plugin-e2e-nightwatch": "^4.2.2",
"@vue/cli-plugin-eslint": "^4.2.2",
"@vue/cli-plugin-unit-jest": "^4.2.2",
"@vue/cli-service": "^4.2.2",
"@vue/test-utils": "1.0.0-beta.31",
"babel-eslint": "^10.0.3",
"babel-jest": "^24.9.0",
"babel-plugin-dynamic-import-node": "^2.3.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.7.0",
"babel-preset-stage-2": "^6.24.1",
"babel-preset-vue-app": "^2.0.0",
"concurrently": "^5.0.2",
"concurrently": "^5.1.0",
"core-js": "^3.6.4",
"eslint": "^6.8.0",
"eslint-config-tjw-base": "^1.0.0",
"eslint-config-tjw-vue": "^1.0.0",
"eslint-plugin-jest": "^23.6.0",
"eslint-plugin-vue": "^6.1.2",
"eslint-plugin-jest": "^23.7.0",
"eslint-plugin-vue": "^6.2.1",
"eslint-plugin-vue-a11y": "^0.0.31",
"jest": "^24.9.0",
"jest-environment-jsdom": "^24.9.0",
"jest-environment-jsdom-global": "^1.2.0",
"jest-serializer-vue-tjw": "^3.3.0",
"jest-transform-stub": "^2.0.0",
"nw": "0.43.6-sdk",
"jest-serializer-vue-tjw": "^3.11.0",
"nw": "0.44.2-sdk",
"nw-vue-devtools-prebuilt": "^0.0.10",
"nwjs-builder-phoenix": "^1.15.0",
"nwjs-types": "^1.0.0",
"rimraf": "^3.0.0",
"rimraf": "^3.0.2",
"vue": "^2.6.11",
"vue-jest": "^3.0.5",
"vue-template-compiler": "^2.6.11",
"wait-on": "^4.0.0"
},
"chromium-args": "--enable-spell-checking --load-extension='./node_modules/nw-vue-devtools-prebuilt/extension'",
"build": {
"nwVersion": "v0.43.6",
"nwVersion": "v0.44.2",
"nwFlavor": "normal",
"targets": [
"zip",

View File

@ -5,7 +5,7 @@ describe('App.vue', () => {
test('Render default contents', () => {
const wrapper = shallowMount(App);
expect(wrapper.html())
expect(wrapper)
.toMatchSnapshot();
});
});

View File

@ -5,23 +5,25 @@ describe('FsExample.vue', () => {
test('Render default contents', () => {
const wrapper = shallowMount(FsExample);
expect(wrapper.html())
expect(wrapper)
.toMatchSnapshot();
});
test('Click button', () => {
test('Click button', async () => {
const wrapper = shallowMount(FsExample);
let domButton = wrapper.find('[data-test="fs-example-button"]');
domButton.trigger('click');
await wrapper.vm.$nextTick();
expect(window.nw.require)
.toHaveBeenCalledWith('fs');
expect(wrapper.html())
expect(wrapper)
.toMatchSnapshot();
});
test('Error state', () => {
test('Error state', async () => {
window.nw.require.mockImplementation((module) => {
if (module === 'fs') {
return new Error();
@ -32,10 +34,12 @@ describe('FsExample.vue', () => {
let domButton = wrapper.find('[data-test="fs-example-button"]');
domButton.trigger('click');
await wrapper.vm.$nextTick();
expect(window.nw.require)
.toHaveBeenCalledWith('fs');
expect(wrapper.html())
expect(wrapper)
.toMatchSnapshot();
});
});

View File

@ -15,23 +15,23 @@ describe('HelloWorld.vue', () => {
test('Render default contents', () => {
const wrapper = mount(HelloWorld);
expect(wrapper.html())
expect(wrapper)
.toMatchSnapshot();
});
test('Activate dev tools', () => {
test('Activate dev tools', async () => {
const wrapper = shallowMount(HelloWorld);
const button = wrapper.find('[data-test="toggleDevTools"]');
button.trigger('click');
wrapper.vm.$nextTick();
await wrapper.vm.$nextTick();
expect(wrapper.find('[data-test="toggleDevTools').html())
.toMatchSnapshot('hide');
button.trigger('click');
wrapper.vm.$nextTick();
await wrapper.vm.$nextTick();
expect(wrapper.find('[data-test="toggleDevTools').html())
.toMatchSnapshot('show');

View File

@ -32,7 +32,7 @@ describe('LinkList.vue', () => {
propsData: { links: [link] }
});
expect(wrapper.html())
expect(wrapper)
.toMatchSnapshot();
});

View File

@ -24,10 +24,10 @@ exports[`HelloWorld.vue Render default contents 1`] = `
<h3>
You are using
Vue.js (v2.6.11),
NW.js (v0.43.6-sdk),
Node.js (v13.6.0),
NW.js (v0.44.2-sdk),
Node.js (v13.8.0),
and
Chromium (v79.0.3945.130).
Chromium (v80.0.3987.116).
</h3>
<button>
Show

View File

@ -27,10 +27,10 @@ global.beforeEach(() => {
NODE_ENV: 'development'
},
versions: {
chromium: '79.0.3945.130',
nw: '0.43.6',
chromium: '80.0.3987.116',
nw: '0.44.2',
'nw-flavor': 'sdk',
node: '13.6.0'
node: '13.8.0'
}
};
window.nw = {