chore: fix minor script warnings (#25575)
This commit is contained in:
parent
353c63e47a
commit
515e85079f
7 changed files with 8 additions and 15 deletions
|
@ -420,10 +420,4 @@ const getGuest = function (guestInstanceId) {
|
||||||
if (guestInstance != null) return guestInstance.guest;
|
if (guestInstance != null) return guestInstance.guest;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Returns the embedder of the guest.
|
|
||||||
const getEmbedder = function (guestInstanceId) {
|
|
||||||
const guestInstance = guestInstances[guestInstanceId];
|
|
||||||
if (guestInstance != null) return guestInstance.embedder;
|
|
||||||
};
|
|
||||||
|
|
||||||
exports.isWebViewTagEnabled = isWebViewTagEnabled;
|
exports.isWebViewTagEnabled = isWebViewTagEnabled;
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
const args = require('minimist')(process.argv.slice(2));
|
const args = require('minimist')(process.argv.slice(2));
|
||||||
const { Octokit } = require('@octokit/rest');
|
const { Octokit } = require('@octokit/rest');
|
||||||
const octokit = new Octokit();
|
const octokit = new Octokit();
|
||||||
const path = require('path');
|
|
||||||
|
|
||||||
async function checkIfDocOnlyChange () {
|
async function checkIfDocOnlyChange () {
|
||||||
if (args.prNumber || args.prBranch || args.prURL) {
|
if (args.prNumber || args.prBranch || args.prURL) {
|
||||||
|
|
|
@ -182,7 +182,7 @@ const parseCommitMessage = (commitMessage, commit) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://help.github.com/articles/closing-issues-using-keywords/
|
// https://help.github.com/articles/closing-issues-using-keywords/
|
||||||
if ((match = body.match(/\b(?:close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved|for)\s#(\d+)\b/i))) {
|
if (body.match(/\b(?:close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved|for)\s#(\d+)\b/i)) {
|
||||||
commit.semanticType = commit.semanticType || 'fix';
|
commit.semanticType = commit.semanticType || 'fix';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -199,7 +199,7 @@ async function prepareRelease (isBeta, notesOnly) {
|
||||||
const releaseNotes = await getReleaseNotes(currentBranch, newVersion);
|
const releaseNotes = await getReleaseNotes(currentBranch, newVersion);
|
||||||
console.log(`Draft release notes are: \n${releaseNotes.text}`);
|
console.log(`Draft release notes are: \n${releaseNotes.text}`);
|
||||||
} else {
|
} else {
|
||||||
const changes = await changesToRelease(currentBranch);
|
const changes = await changesToRelease();
|
||||||
if (changes) {
|
if (changes) {
|
||||||
await verifyNewVersion();
|
await verifyNewVersion();
|
||||||
await createRelease(currentBranch, isBeta);
|
await createRelease(currentBranch, isBeta);
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
},
|
},
|
||||||
'window-open': () => {
|
'window-open': () => {
|
||||||
addEventListener('load', () => {
|
addEventListener('load', () => {
|
||||||
popup = open(window.location.href, 'popup!', 'top=60,left=50,width=500,height=600')
|
const popup = open(window.location.href, 'popup!', 'top=60,left=50,width=500,height=600')
|
||||||
popup.addEventListener('DOMContentLoaded', () => {
|
popup.addEventListener('DOMContentLoaded', () => {
|
||||||
popup.document.write('<h1>scripting from opener</h1>')
|
popup.document.write('<h1>scripting from opener</h1>')
|
||||||
popup.callback()
|
popup.callback()
|
||||||
|
@ -82,7 +82,7 @@
|
||||||
},
|
},
|
||||||
'verify-ipc-sender': () => {
|
'verify-ipc-sender': () => {
|
||||||
const {ipcRenderer} = require('electron')
|
const {ipcRenderer} = require('electron')
|
||||||
popup = open()
|
const popup = open()
|
||||||
ipcRenderer.once('verified', () => {
|
ipcRenderer.once('verified', () => {
|
||||||
ipcRenderer.send('parent-answer')
|
ipcRenderer.send('parent-answer')
|
||||||
})
|
})
|
||||||
|
|
|
@ -30,7 +30,7 @@ function atob (str) {
|
||||||
// in this case, frames has a very specific meaning, which will be
|
// in this case, frames has a very specific meaning, which will be
|
||||||
// detailed once i finish writing the code
|
// detailed once i finish writing the code
|
||||||
|
|
||||||
function ToWebM (frames, outputAsArray) {
|
function ToWebM (frames) {
|
||||||
const info = checkFrames(frames);
|
const info = checkFrames(frames);
|
||||||
|
|
||||||
// max duration by cluster in milliseconds
|
// max duration by cluster in milliseconds
|
||||||
|
@ -235,7 +235,7 @@ function ToWebM (frames, outputAsArray) {
|
||||||
if (i >= 3) {
|
if (i >= 3) {
|
||||||
cues.data[i - 3].data[1].data[1].data = position;
|
cues.data[i - 3].data[1].data[1].data = position;
|
||||||
}
|
}
|
||||||
const data = generateEBML([segment.data[i]], outputAsArray);
|
const data = generateEBML([segment.data[i]]);
|
||||||
position += data.size || data.byteLength || data.length;
|
position += data.size || data.byteLength || data.length;
|
||||||
if (i !== 2) { // not cues
|
if (i !== 2) { // not cues
|
||||||
// Save results to avoid having to encode everything twice
|
// Save results to avoid having to encode everything twice
|
||||||
|
@ -243,7 +243,7 @@ function ToWebM (frames, outputAsArray) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return generateEBML(EBML, outputAsArray);
|
return generateEBML(EBML);
|
||||||
}
|
}
|
||||||
|
|
||||||
// sums the lengths of all the frames and gets the duration, woo
|
// sums the lengths of all the frames and gets the duration, woo
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
process.throwDeprecation = false;
|
process.throwDeprecation = false;
|
||||||
|
|
||||||
const electron = require('electron');
|
const electron = require('electron');
|
||||||
const { app, BrowserWindow, dialog, ipcMain, protocol, webContents, session } = electron;
|
const { app, BrowserWindow, dialog, ipcMain, session } = electron;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
require('fs').rmdirSync(app.getPath('userData'), { recursive: true });
|
require('fs').rmdirSync(app.getPath('userData'), { recursive: true });
|
||||||
|
|
Loading…
Reference in a new issue