Skip to content

Commit 3dac51e

Browse files
committed
chore: updating vue2, vue/cli, bootstrap and bootstrap-vue packages to the latest. Resolve some warnings with some exceptions.
1 parent 76091f1 commit 3dac51e

File tree

9 files changed

+11352
-28122
lines changed

9 files changed

+11352
-28122
lines changed

.eslintrc.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@ module.exports = {
1313
rules: {
1414
'no-console': process.env.NODE_ENV === 'production' ? 'off' : 'off',
1515
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
16+
'vue/multi-word-component-names': 'off',
17+
'vue/no-mutating-props': 'off',
18+
'vuejs-accessibility/media-has-caption': 'off',
1619
},
1720

1821
parserOptions: {
19-
parser: 'babel-eslint',
22+
parser: '@babel/eslint-parser',
2023
},
2124

2225
overrides: [

package-lock.json

Lines changed: 11295 additions & 28094 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,32 @@
1010
"deploy": "npm run build && gh-pages -d dist"
1111
},
1212
"dependencies": {
13-
"bootstrap": "^4.5.2",
14-
"bootstrap-vue": "^2.17.3",
13+
"bootstrap": "^4.6.2",
14+
"bootstrap-vue": "^2.22.0",
1515
"core-js": "^3.4.3",
1616
"gh-pages": "^3.1.0",
1717
"lodash.clonedeep": "^4.5.0",
1818
"lodash.merge": "^4.6.2",
19-
"vue": "^2.6.11",
20-
"vue-router": "^3.2.0"
19+
"vue": "^2.7.8",
20+
"vue-router": "^3.5.4"
2121
},
2222
"devDependencies": {
23-
"@vue/cli-plugin-babel": "~4.5.0",
24-
"@vue/cli-plugin-eslint": "~4.5.0",
25-
"@vue/cli-plugin-router": "~4.5.0",
26-
"@vue/cli-plugin-unit-jest": "~4.5.4",
27-
"@vue/cli-service": "~4.5.0",
28-
"@vue/eslint-config-airbnb": "^5.0.2",
23+
"@babel/core": "^7.12.16",
24+
"@babel/eslint-parser": "^7.12.16",
25+
"@vue/cli-plugin-babel": "^5.0.8",
26+
"@vue/cli-plugin-eslint": "^5.0.8",
27+
"@vue/cli-plugin-router": "^5.0.8",
28+
"@vue/cli-plugin-unit-jest": "^5.0.8",
29+
"@vue/cli-service": "^5.0.8",
30+
"@vue/eslint-config-airbnb": "^6.0.0",
2931
"@vue/test-utils": "^1.0.3",
30-
"babel-eslint": "^10.1.0",
31-
"eslint": "^6.7.2",
32-
"eslint-plugin-vue": "^6.2.2",
33-
"vue-template-compiler": "^2.6.11"
32+
"eslint": "^7.32.0",
33+
"eslint-plugin-import": "^2.25.3",
34+
"eslint-plugin-vue": "^8.0.3",
35+
"eslint-plugin-vuejs-accessibility": "^1.1.0",
36+
"vue-template-compiler": "^2.6.11",
37+
"jest": "^27.1.0",
38+
"@vue/vue2-jest": "^27.0.0-alpha.3"
3439
},
3540
"homepage": "https://alfg.github.io/ffmpeg-commander"
3641
}

src/App.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ App
6868
</template>
6969

7070
<script>
71-
import { name, version } from '../package.json';
71+
import pkgInfo from '../package.json';
7272
import GitHubCorner from './components/GitHubCorner.vue';
7373
import Queue from './components/Queue.vue';
7474

@@ -91,8 +91,8 @@ export default {
9191
},
9292
data() {
9393
return {
94-
name,
95-
version,
94+
name: pkgInfo.name,
95+
version: pkgInfo.version,
9696
tabIndex: 0,
9797
};
9898
},

src/components/Editor.vue

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
v-on:reset="reset"
5959
v-on:save="save"
6060
v-on:encode="encode"
61+
v-on:toggleJSON="toggleJSON"
6162
/>
6263

6364
<!-- JSON formatted viewer so the user can view or copy the configured
@@ -67,7 +68,6 @@
6768
</template>
6869

6970
<script>
70-
import path from 'path';
7171
import merge from 'lodash.merge';
7272
import clone from 'lodash.clonedeep';
7373
import form from '@/form';
@@ -232,9 +232,11 @@ export default {
232232
this.cmd = ffmpeg.build(opt);
233233
},
234234
updateOutput() {
235+
// This is a bit of a hack to update the output filename extension
236+
// in the form.io.output field, which is mutating a property.
235237
if (this.form.io.output) {
236238
const { format, io } = this.form;
237-
const ext = path.extname(io.output);
239+
const ext = util.extname(io.output);
238240
if (ext) {
239241
this.form.io.output = `${io.output.replace(ext, `.${format.container}`)}`;
240242
}
@@ -260,9 +262,8 @@ export default {
260262
}
261263
262264
// Save the preset name and reload the presets list.
263-
const presetName = presets.savePresetToLocalStorage(
264-
this.preset.id, this.preset.name, this.form,
265-
);
265+
const presetName = presets
266+
.savePresetToLocalStorage(this.preset.id, this.preset.name, this.form);
266267
this.presets = presets.getPresetOptions();
267268
this.preset.id = presetName;
268269
this.preset.name = this.preset.name || this.preset.id;
@@ -281,6 +282,9 @@ export default {
281282
});
282283
this.$emit('onEncode');
283284
},
285+
toggleJSON() {
286+
this.controls.showJSON = !this.controls.showJSON;
287+
},
284288
},
285289
};
286290
</script>

src/components/FileIO.vue

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,15 @@
1919
v-model="value.input"
2020
:state="Boolean(value.input)"
2121
placeholder="Example: input.mp4"
22+
@input="update('input', $event)"
2223
></b-form-input>
2324

2425
<b-form-input
2526
v-else
2627
v-model="value.input"
2728
placeholder=""
2829
@focus="onFileFocus"
30+
@input="update('input', $event)"
2931
></b-form-input>
3032

3133
<div v-if="showFileBrowser">
@@ -43,7 +45,7 @@
4345
v-if="!$store.state.ffmpegdEnabled"
4446
class="protocol"
4547
v-model="protocolOutput"
46-
@change="update('output', $event)"
48+
@input="update('output', $event)"
4749
>
4850
<option v-for="o in protocols" :key="o.id" :value="o.value">{{o.name}}</option>
4951
</b-form-select>
@@ -52,6 +54,7 @@
5254
v-model="value.output"
5355
:state="Boolean(value.output)"
5456
placeholder="Example: output.mp4"
57+
@input="update('output', $event)"
5558
></b-form-input>
5659
</b-input-group>
5760
</b-form-group>
@@ -97,6 +100,12 @@ export default {
97100
onClose() {
98101
this.showFileBrowser = false;
99102
},
103+
addInput() {
104+
this.inputs += 1;
105+
},
106+
removeInput() {
107+
this.inputs -= 1;
108+
},
100109
},
101110
};
102111
</script>

src/components/Presets.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<b-form-group label="Preset: " label-for="preset">
66
<b-form-select
77
class="u-full-width"
8-
v-model="value.id"
9-
@change="update('preset', $event)"
8+
v-model="id"
9+
@change="update('id', $event)"
1010
>
1111
<optgroup v-for="(o, i) in presets" :label="o.name" v-bind:key="i">
1212
<option
@@ -25,7 +25,7 @@
2525
v-if="value.name"
2626
>
2727
<b-form-input
28-
v-model="value.name"
28+
v-model="name"
2929
></b-form-input>
3030
</b-form-group>
3131
</b-col>
@@ -42,6 +42,8 @@ export default {
4242
data() {
4343
return {
4444
presets: presets.getPresetOptions(),
45+
id: 'custom',
46+
name: '',
4547
};
4648
},
4749
methods: {

src/components/Toolbar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export default {
102102
}, 1000);
103103
},
104104
toggleJSON() {
105-
this.value.showJSON = !this.value.showJSON;
105+
this.$emit('toggleJSON');
106106
},
107107
deletePreset() {
108108
presets.deletePreset(this.preset.id);

src/util.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,15 @@ function transformToQueryParams(form) {
238238
return params;
239239
}
240240

241+
function extname(filename) {
242+
const i = filename.lastIndexOf('.');
243+
return (i < 0) ? '' : filename.substr(i);
244+
}
245+
241246
export default {
242247
transform,
243248
transformToJSON,
244249
transformFromQueryParams,
245250
transformToQueryParams,
251+
extname,
246252
};

0 commit comments

Comments
 (0)