Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies #3973

Merged
merged 15 commits into from
Feb 16, 2021
7,520 changes: 3,727 additions & 3,793 deletions package-lock.json

Large diffs are not rendered by default.

38 changes: 21 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@
},
"dependencies": {
"@cheap-glitch/mi-cron": "^1.0.1",
"@primer/octicons-react": "^11.2.0",
"@primer/octicons-react": "^12.0.0",
"copy-text-to-clipboard": "^3.0.0",
"debounce-fn": "^4.0.0",
"delay": "^4.4.1",
"delay": "^5.0.0",
"delegate-it": "^2.0.2",
"dom-chef": "^4.2.2",
"dom-loaded": "^2.0.0",
"doma": "^3.0.1",
"element-ready": "^5.0.0",
"fit-textarea": "^2.0.0",
"flat-zip": "^1.0.1",
"github-url-detection": "^4.6.0",
"github-url-detection": "^4.7.0",
"image-promise": "^7.0.1",
"indent-textarea": "^2.0.3",
"js-abbreviation-number": "^1.0.0",
Expand All @@ -60,13 +60,13 @@
"regex-join": "^1.0.0",
"select-dom": "^7.1.0",
"selector-observer": "^2.1.6",
"shorten-repo-url": "^2.0.1",
"shorten-repo-url": "^2.1.0",
"strip-indent": "^3.0.0",
"text-field-edit": "^3.1.0",
"tiny-version-compare": "^3.0.1",
"twas": "^2.1.2",
"webext-base-css": "^1.3.1",
"webext-domain-permission-toggle": "^2.0.0",
"webext-domain-permission-toggle": "^2.1.0",
"webext-dynamic-content-scripts": "^7.1.0",
"webext-options-sync-per-domain": "^2.0.2",
"webext-storage-cache": "^4.2.0",
Expand All @@ -77,43 +77,47 @@
"@ava/typescript": "^1.1.1",
"@rollup/plugin-typescript": "^8.1.1",
"@sindresorhus/tsconfig": "^0.8.0",
"@types/chrome": "^0.0.129",
"@types/codemirror": "^0.0.107",
"@types/chrome": "^0.0.130",
"@types/codemirror": "^0.0.108",
"@types/copy-webpack-plugin": "^6.4.0",
"@types/firefox-webext-browser": "^82.0.0",
"@types/jsdom": "^16.2.6",
"@types/mini-css-extract-plugin": "^1.2.2",
"@types/react": "^17.0.0",
"@types/react": "^17.0.2",
"@types/terser-webpack-plugin": "^5.0.2",
"ava": "^3.15.0",
"copy-webpack-plugin": "^7.0.0",
"css-loader": "^5.0.1",
"css-loader": "^5.0.2",
"daily-version": "^2.0.0",
"decamelize": "^5.0.0",
"dot-json": "^1.2.1",
"esbuild-loader": "^2.8.0",
"esbuild-loader": "^2.9.1",
"eslint-config-xo-react": "^0.23.0",
"eslint-plugin-react": "^7.22.0",
"eslint-plugin-react-hooks": "^4.2.0",
"jsdom": "^16.4.0",
"markdown-wasm": "^1.1.2",
"mini-css-extract-plugin": "^1.3.5",
"mini-css-extract-plugin": "^1.3.6",
"npm-run-all": "^4.1.5",
"rollup": "^2.38.1",
"rollup": "^2.39.0",
"size-plugin": "^2.0.2",
"string-replace-loader": "^3.0.1",
"stylelint": "^13.9.0",
"stylelint": "^13.10.0",
"stylelint-config-xo": "^0.20.0",
"terser-webpack-plugin": "^5.1.1",
"ts-node": "^9.1.1",
"tslib": "^2.1.0",
"type-fest": "^0.20.2",
"type-fest": "^0.21.1",
"typed-query-selector": "^2.4.1",
"typescript": "^4.1.3",
"webpack": "^5.19.0",
"webpack-cli": "^4.4.0",
"typescript": "^4.1.5",
"webpack": "^5.22.0",
"webpack-cli": "^4.5.0",
"xo": "^0.37.1"
},
"engines": {
"node": ">= 15",
"npm": ">= 7"
},
"webExt": {
"sourceDir": "distribution",
"run": {
Expand Down
1 change: 1 addition & 0 deletions source/features/bugs-tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ async function init(): Promise<void | false> {
if (isBugsPage) {
// Hide pinned issues on the tab page, they might not belong there
// Don't await; if there are no pinned issues, this would delay the bug count update
// eslint-disable-next-line promise/prefer-await-to-then
void elementReady('.js-pinned-issues-reorder-container', {waitForChildren: false}).then(pinnedIssues => pinnedIssues?.remove());
}

Expand Down
4 changes: 2 additions & 2 deletions source/features/collapsible-content-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import * as textFieldEdit from 'text-field-edit';
import features from '.';
import smartBlockWrap from '../helpers/smart-block-wrap';

function addContentToDetails(event: delegate.Event<MouseEvent, HTMLButtonElement>): void {
const field = event.delegateTarget.form!.querySelector('textarea')!;
function addContentToDetails({delegateTarget}: delegate.Event<MouseEvent, HTMLButtonElement>): void {
const field = delegateTarget.form!.querySelector('textarea')!;
const selection = field.value.slice(field.selectionStart, field.selectionEnd);

// Don't indent <summary> because indentation will not be automatic on multi-line content
Expand Down
4 changes: 2 additions & 2 deletions source/features/fit-textareas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import * as pageDetect from 'github-url-detection';
import features from '.';
import onPrMergePanelOpen from '../github-events/on-pr-merge-panel-open';

function inputListener(event: Event): void {
fitTextarea(event.target as HTMLTextAreaElement);
function inputListener({target}: Event): void {
fitTextarea(target as HTMLTextAreaElement);
}

function watchTextarea(textarea: HTMLTextAreaElement): void {
Expand Down
2 changes: 1 addition & 1 deletion source/features/tags-on-commits-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ async function getTags(lastCommit: string, after?: string): Promise<CommitTags>
}
}
`);
const nodes: TagNode[] = repository.refs.nodes;
const nodes = repository.refs.nodes as TagNode[];

// If there are no tags in the repository
if (nodes.length === 0) {
Expand Down
4 changes: 2 additions & 2 deletions source/github-events/on-new-comments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ function removeListeners(): void {
}

function getFragmentLoadHandler(callback: EventListener): delegate.EventHandler {
return (event: delegate.Event) => {
event.delegateTarget.addEventListener('load', callback);
return ({delegateTarget}) => {
delegateTarget.addEventListener('load', callback);
};
}

Expand Down
1 change: 1 addition & 0 deletions source/options-storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ function featureWasRenamed(from: string, to: string): Migration<RGHOptions> {
}

// TypeScript doesn't merge the definitions so `...` is not equivalent.
// eslint-disable-next-line prefer-object-spread
const defaults = Object.assign({
customCSS: '',
personalToken: '',
Expand Down
9 changes: 5 additions & 4 deletions webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,11 @@ function parseFeatureDetails(readmeContent: string, id: FeatureID): FeatureMeta
}

function getFeatures(): FeatureID[] {
return Array.from(
readFileSync(path.join(__dirname, 'source/refined-github.ts'), 'utf-8').matchAll(/^import '\.\/features\/([^.]+)';/gm),
match => match[1] as FeatureID
).sort().filter(id => !id.startsWith('rgh-'));
const contents = readFileSync(path.join(__dirname, 'source/refined-github.ts'), 'utf-8');
return [...contents.matchAll(/^import '\.\/features\/([^.]+)';/gm)]
.map(match => match[1] as FeatureID)
.sort()
.filter(id => !id.startsWith('rgh-'));
}

const config: Configuration = {
Expand Down