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 #73

Merged
merged 1 commit into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion file.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import {stringToBase64} from 'uint8array-extras';

const filePickerOptions: FilePickerOptions = {
types: [
{
Expand Down Expand Up @@ -32,7 +34,7 @@ async function loadFileOld(): Promise<string> {
async function saveFileOld(text: string, suggestedName: string): Promise<void> {
// Use data URL because Safari doesn't support saving blob URLs
// Use base64 or else linebreaks are lost
const url = `data:application/json;base64,${btoa(text)}`;
const url = `data:application/json;base64,${stringToBase64(text)}`;
const link = document.createElement('a');
link.download = suggestedName;
link.href = url;
Expand Down
6 changes: 3 additions & 3 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,8 @@ class OptionsSync<UserOptions extends Options> {
await saveFile(text, extension.name + ' options.json');
};

private _log(method: 'log' | 'info', ...args: unknown[]): void {
console[method](...args);
private _log(method: 'log' | 'info', ...arguments_: unknown[]): void {
console[method](...arguments_);
}

private async _getAll(): Promise<UserOptions> {
Expand Down Expand Up @@ -278,7 +278,7 @@ class OptionsSync<UserOptions extends Options> {
private _decode(options: string | UserOptions): UserOptions {
let decompressed = options;
if (typeof options === 'string') {
decompressed = JSON.parse(decompressFromEncodedURIComponent(options)!) as UserOptions;
decompressed = JSON.parse(decompressFromEncodedURIComponent(options)) as UserOptions;
}

return {...this.defaults, ...decompressed as UserOptions};
Expand Down
23 changes: 12 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,24 @@
"dom-form-serializer": "^2.0.0",
"lz-string": "^1.5.0",
"throttle-debounce": "^5.0.0",
"webext-detect-page": "^4.1.1",
"webext-events": "^2.0.0",
"uint8array-extras": "^1.1.0",
"webext-detect-page": "^5.0.1",
"webext-events": "^3.0.0",
"webext-polyfill-kinda": "^1.0.2"
},
"devDependencies": {
"@sindresorhus/tsconfig": "^4.0.0",
"@types/chrome": "0.0.246",
"@sindresorhus/tsconfig": "^5.0.0",
"@types/chrome": "0.0.268",
"@types/lz-string": "^1.3.34",
"@types/throttle-debounce": "^5.0.0",
"@types/wicg-file-system-access": "^2020.9.6",
"ava": "^5.3.1",
"@types/throttle-debounce": "^5.0.2",
"@types/wicg-file-system-access": "^2023.10.5",
"ava": "^6.1.3",
"npm-run-all": "^4.1.5",
"sinon": "^16.0.0",
"sinon": "^18.0.0",
"sinon-chrome": "^3.0.1",
"type-fest": "^4.3.1",
"typescript": "^5.2.2",
"xo": "^0.56.0"
"type-fest": "^4.20.0",
"typescript": "^5.4.5",
"xo": "^0.58.0"
},
"engines": {
"node": ">=18"
Expand Down
Loading