Compare commits

..

11 Commits

Author SHA1 Message Date
Thomas Rupprecht 812a1b6110 0.9.4 2023-09-13 20:37:32 +02:00
Thomas Rupprecht 8410af011b feat: update git url from `gitea.usrspace.at` to `git.usrspace.at` 2023-09-13 20:32:23 +02:00
Thomas Rupprecht ae56bdf5bc chore(package): update `eslint`, `eslint-plugin-jsdoc` 2023-09-13 20:28:18 +02:00
Thomas Rupprecht 91e6bd10b6 feat(popup): import `extension.css` as layer via css 2023-09-13 20:19:51 +02:00
Thomas Rupprecht d97dc9da87 fix(background): fix background script init 2023-09-13 20:09:46 +02:00
Thomas Rupprecht dd95d5a0ac chore(package): update `package-lock.json` 2023-09-08 01:08:58 +02:00
Thomas Rupprecht 4037ec9631 feat(linting): add `eslint` with `unicorn`, `jsdoc`, `no-unsanitized` plugins 2023-09-08 01:00:20 +02:00
Thomas Rupprecht 2c7230fdc9 refactor(popup): general code improvements by linter hints 2023-09-08 00:49:12 +02:00
Thomas Rupprecht ea43a4cd9d chore(types): make `Calendar` types readonly 2023-09-08 00:12:19 +02:00
Thomas Rupprecht e711fb11a8 fix(package): update web-ext to support newer browser APIs and remove `addon-linter` override 2023-09-07 13:12:11 +02:00
Thomas Rupprecht 3f1300543d refactor(background): inline `fetch` and use `URLSearchParams` 2023-09-06 21:30:19 +02:00
13 changed files with 592 additions and 235 deletions

View File

@ -6,6 +6,30 @@ All notable changes to this project will be documented in this file.
### ⛰️ Features
- Add `eslint` with `unicorn`, `jsdoc`, `no-unsanitized` plugins
- Import `extension.css` as layer via css
- Update git url from `gitea.usrspace.at` to `git.usrspace.at`
### 🐛 Bug Fixes
- Update web-ext to support newer browser APIs and remove `addon-linter` override
- Fix background script init
### 🚜 Refactor
- Inline `fetch` and use `URLSearchParams`
- General code improvements by linter hints
### ⚙️ Miscellaneous Tasks
- Make `Calendar` types readonly
- Update `package-lock.json`
- Update `eslint`, `eslint-plugin-jsdoc`
## \[[0.9.3](https://git.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.9.3)] - 2023-09-06
### ⛰️ Features
- Add commitlint to enforce commit message format
- Update the changelog automatically on every commit
- Improve colors, refactor css, support rtl lang
@ -39,7 +63,7 @@ All notable changes to this project will be documented in this file.
- Update @commitlint/{cli,config-conventional,cz-commitlint}
- Update @commitlint/{cli,config-conventional,cz-commitlint}, git-cliff
## \[[0.9.2](https://gitea.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.9.2)] - 2023-05-24
## \[[0.9.2](https://git.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.9.2)] - 2023-05-24
### ⛰️ Features
@ -76,7 +100,7 @@ All notable changes to this project will be documented in this file.
- Add pre-commit hook with husky
- Improve git-cliff config
## \[[0.9.1](https://gitea.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.9.1)] - 2023-01-22
## \[[0.9.1](https://git.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.9.1)] - 2023-01-22
### ✳️ Other
@ -86,7 +110,7 @@ All notable changes to this project will be documented in this file.
- Await init
- Add link to Pad
## \[[0.9.0](https://gitea.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.9.0)] - 2023-01-20
## \[[0.9.0](https://git.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.9.0)] - 2023-01-20
### ✳️ Other
@ -94,7 +118,7 @@ All notable changes to this project will be documented in this file.
- Update to manifest_version v3
- Make code compatible with manifest_version v3
## \[[0.8.7](https://gitea.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.8.7)] - 2023-01-20
## \[[0.8.7](https://git.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.8.7)] - 2023-01-20
### ✳️ Other
@ -107,13 +131,13 @@ All notable changes to this project will be documented in this file.
- Remove persistent flag in manifest config
- Open usrspace.at homepage on install
## \[[0.8.6](https://gitea.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.8.6)] - 2023-01-05
## \[[0.8.6](https://git.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.8.6)] - 2023-01-05
### ✳️ Other
- Change addon id to currently used one
## \[[0.8.5](https://gitea.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.8.5)] - 2023-01-05
## \[[0.8.5](https://git.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.8.5)] - 2023-01-05
### ✳️ Other
@ -123,7 +147,7 @@ All notable changes to this project will be documented in this file.
- Inject browser-polyfill only in chromium builds
- Add addon id
## \[[0.8.4](https://gitea.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.8.4)] - 2023-01-05
## \[[0.8.4](https://git.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.8.4)] - 2023-01-05
### ✳️ Other
@ -132,13 +156,13 @@ All notable changes to this project will be documented in this file.
- Simplify updateSpaceApiJson
- Add lint script
## \[[0.8.3](https://gitea.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.8.3)] - 2023-01-04
## \[[0.8.3](https://git.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.8.3)] - 2023-01-04
### ✳️ Other
- Update strict_min_version to 57.0
## \[[0.8.2](https://gitea.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.8.2)] - 2023-01-04
## \[[0.8.2](https://git.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.8.2)] - 2023-01-04
### ✳️ Other
@ -146,7 +170,7 @@ All notable changes to this project will be documented in this file.
- Set html lang by browser language
- Improve popup styling
## \[[0.8.1](https://gitea.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.8.1)] - 2022-12-25
## \[[0.8.1](https://git.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.8.1)] - 2022-12-25
### 🐛 Bug Fixes
@ -165,7 +189,7 @@ All notable changes to this project will be documented in this file.
- Unfiy codestyle
- Cleanup data on startup
## \[[0.8.0](https://gitea.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.8.0)] - 2022-12-24
## \[[0.8.0](https://git.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.8.0)] - 2022-12-24
### ✳️ Other
@ -183,7 +207,7 @@ All notable changes to this project will be documented in this file.
- Increase svg size
- Set build filename
## \[[0.7](https://gitea.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.7)] - 2021-11-06
## \[[0.7](https://git.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.7)] - 2021-11-06
### 🐛 Bug Fixes
@ -208,19 +232,19 @@ All notable changes to this project will be documented in this file.
- Change icon
- Remove old html code and load right svg
## \[[0.4](https://gitea.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.4)] - 2019-10-04
## \[[0.4](https://git.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.4)] - 2019-10-04
### 🐛 Bug Fixes
- Fix wrong icon
## \[[0.3](https://gitea.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.3)] - 2019-10-04
## \[[0.3](https://git.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.3)] - 2019-10-04
### ✳️ Other
- Improve popup content
## \[[0.2](https://gitea.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.2)] - 2019-08-28
## \[[0.2](https://git.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.2)] - 2019-08-28
### 🐛 Bug Fixes

View File

@ -18,7 +18,7 @@
## Install
```ssh
$ git clone https://gitea.usrspace.at/XimeX/usrspace-browser-addon.git
$ git clone https://git.usrspace.at/XimeX/usrspace-browser-addon.git
# optional
$ npm i -g web-ext
$ npm i

View File

@ -15,7 +15,7 @@ All notable changes to this project will be documented in this file.\n
# https://tera.netlify.app/docs/
body = """
{% if version %}\
## \\[[{{ version | trim_start_matches(pat="v") }}](https://gitea.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/{{ version }})] - {{ timestamp | date(format="%Y-%m-%d") }}
## \\[[{{ version | trim_start_matches(pat="v") }}](https://git.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/{{ version }})] - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
## \\[unreleased]
{% endif %}\
@ -42,7 +42,7 @@ filter_unconventional = false
split_commits = false
# regex for preprocessing the commit messages
commit_preprocessors = [
# { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](https://gitea.usrspace.at/XimeX/usrspace-browser-addon/issues/${2}))" },
# { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](https://git.usrspace.at/XimeX/usrspace-browser-addon/issues/${2}))" },
]
# regex for parsing and grouping commits
commit_parsers = [

46
eslint.config.js Normal file
View File

@ -0,0 +1,46 @@
const globals = require('globals');
const js = require('@eslint/js');
const unicorn = require('eslint-plugin-unicorn');
const jsdoc = require('eslint-plugin-jsdoc');
const noUnsanitized = require('eslint-plugin-no-unsanitized');
module.exports = [
{
files: ['**/*.js'],
ignores: ['src/browser-polyfill.js'],
languageOptions: {
globals: {
...globals.browser,
...globals.commonjs,
...globals.webextensions,
},
},
plugins: {
unicorn,
jsdoc,
'no-unsanitized': noUnsanitized,
},
rules: {
// ### ESLint (https://eslint.org/docs/latest/rules/)
...js.configs.recommended.rules,
// ### Unicorn (https://github.com/sindresorhus/eslint-plugin-unicorn#rules)
...unicorn.configs.recommended.rules,
'unicorn/no-nested-ternary': 'off',
'unicorn/no-null': 'off',
'unicorn/prefer-module': 'off',
'unicorn/prevent-abbreviations': 'off',
// ### JSDoc (https://github.com/gajus/eslint-plugin-jsdoc/tree/main#user-content-eslint-plugin-jsdoc-rules)
...jsdoc.configs['flat/recommended-error'].rules,
'jsdoc/check-indentation': 'error',
'jsdoc/require-asterisk-prefix': 'error',
'jsdoc/require-jsdoc': ['error', { exemptEmptyFunctions: true }],
'jsdoc/require-param-description': 'off',
'jsdoc/require-returns-description': 'off',
// ### no-unsanitized (https://github.com/mozilla/eslint-plugin-no-unsanitized#rule-details)
...noUnsanitized.configs.DOM.rules,
},
},
];

550
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "usrspace-browser-addon",
"version": "0.9.3",
"version": "0.9.4",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "usrspace-browser-addon",
"version": "0.9.3",
"version": "0.9.4",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
@ -18,13 +18,17 @@
"@commitlint/cz-commitlint": "^17.7.1",
"@types/firefox-webext-browser": "^111.0.1",
"commitizen": "^4.3.0",
"eslint": "^8.49.0",
"eslint-plugin-jsdoc": "^46.6.0",
"eslint-plugin-no-unsanitized": "^4.0.2",
"eslint-plugin-unicorn": "^48.0.1",
"git-cliff": "^1.3.0",
"husky": "^8.0.3",
"stylelint": "^15.10.3",
"stylelint-config-standard": "^34.0.0",
"stylelint-plugin-defensive-css": "^0.8.1",
"stylelint-plugin-logical-css": "^0.13.2",
"web-ext": "^7.6.2"
"web-ext": "^7.7.0"
}
},
"node_modules/@aashutoshrathi/word-wrap": {
@ -90,6 +94,15 @@
"integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==",
"dev": true
},
"node_modules/@babel/code-frame/node_modules/escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
"dev": true,
"engines": {
"node": ">=0.8.0"
}
},
"node_modules/@babel/code-frame/node_modules/has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
@ -175,6 +188,15 @@
"integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==",
"dev": true
},
"node_modules/@babel/highlight/node_modules/escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
"dev": true,
"engines": {
"node": ">=0.8.0"
}
},
"node_modules/@babel/highlight/node_modules/has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
@ -612,6 +634,20 @@
"node": ">= 0.10.4"
}
},
"node_modules/@es-joy/jsdoccomment": {
"version": "0.40.1",
"resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.40.1.tgz",
"integrity": "sha512-YORCdZSusAlBrFpZ77pJjc5r1bQs5caPWtAu+WWmiSo+8XaUzseapVrfAtiRFbQWnrBxxLLEwF6f6ZG/UgCQCg==",
"dev": true,
"dependencies": {
"comment-parser": "1.4.0",
"esquery": "^1.5.0",
"jsdoc-type-pratt-parser": "~4.0.0"
},
"engines": {
"node": ">=16"
}
},
"node_modules/@eslint-community/eslint-utils": {
"version": "4.4.0",
"resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz",
@ -628,9 +664,9 @@
}
},
"node_modules/@eslint-community/regexpp": {
"version": "4.8.0",
"resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.8.0.tgz",
"integrity": "sha512-JylOEEzDiOryeUnFbQz+oViCXS0KsvR1mvHkoMiu5+UiBvy+RYX7tzlIIIEstF/gVa2tj9AQXk3dgnxv6KxhFg==",
"version": "4.8.1",
"resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.8.1.tgz",
"integrity": "sha512-PWiOzLIUAjN/w5K17PoF4n6sKBw0gqLHPhywmYHP4t1VFQQVYeb1yWsJwnMVEMl3tUHME7X/SJPZLmtG7XBDxQ==",
"dev": true,
"engines": {
"node": "^12.0.0 || ^14.0.0 || >=16.0.0"
@ -682,9 +718,9 @@
"dev": true
},
"node_modules/@eslint/js": {
"version": "8.48.0",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.48.0.tgz",
"integrity": "sha512-ZSjtmelB7IJfWD2Fvb7+Z+ChTIKWq6kjda95fLcQKNS5aheVHn4IkfgRQE3sIIzTcSLwLcLZUD9UBt+V7+h+Pw==",
"version": "8.49.0",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.49.0.tgz",
"integrity": "sha512-1S8uAY/MTJqVx0SC4epBq+N2yhuwtNwLbJYNZyhL2pO1ZVKn5HFXav5T41Ryzy9K9V7ZId2JB2oy/W4aCd9/2w==",
"dev": true,
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@ -855,9 +891,9 @@
}
},
"node_modules/@mdn/browser-compat-data": {
"version": "5.3.8",
"resolved": "https://registry.npmjs.org/@mdn/browser-compat-data/-/browser-compat-data-5.3.8.tgz",
"integrity": "sha512-WE2eeLb0gZJcQEnPhCIQWs+5KpNK2VI0EOWFUvR39/iks2vDSzJO//78hVz/gYdOGXz6mo4jg0T7RygsUbyZ8w==",
"version": "5.3.14",
"resolved": "https://registry.npmjs.org/@mdn/browser-compat-data/-/browser-compat-data-5.3.14.tgz",
"integrity": "sha512-Y9XQrphVcE6u9xMm+gIqN86opbU/5s2W1pdPyKRyFV5B7+2jWM2gLI5JpfhZncaoDKvhy6FYwK04aCz5UM/bTQ==",
"dev": true
},
"node_modules/@nodelib/fs.scandir": {
@ -1082,13 +1118,13 @@
}
},
"node_modules/addons-linter": {
"version": "6.12.0",
"resolved": "https://registry.npmjs.org/addons-linter/-/addons-linter-6.12.0.tgz",
"integrity": "sha512-zz9HdpTjDKJYLllw6STx6k5S01+ZI4BNF46QBZooSaM62npy81+Yb4QfmHid355jVhnQqvz3dXzw/USXYlS6yQ==",
"version": "6.13.0",
"resolved": "https://registry.npmjs.org/addons-linter/-/addons-linter-6.13.0.tgz",
"integrity": "sha512-vYgDXl8aLmN1zU4HmsQdG6tUFByg499mHnTEMWDUbSkoYDq3koTne08EsqU6sD+o814u8FxclQP7580L0g/tPQ==",
"dev": true,
"dependencies": {
"@fluent/syntax": "0.19.0",
"@mdn/browser-compat-data": "5.3.8",
"@mdn/browser-compat-data": "5.3.14",
"addons-moz-compare": "1.3.0",
"addons-scanner-utils": "9.3.0",
"ajv": "8.12.0",
@ -1097,20 +1133,20 @@
"columnify": "1.6.0",
"common-tags": "1.8.2",
"deepmerge": "4.3.1",
"eslint": "8.46.0",
"eslint": "8.48.0",
"eslint-plugin-no-unsanitized": "4.0.2",
"eslint-visitor-keys": "3.4.2",
"eslint-visitor-keys": "3.4.3",
"espree": "9.6.1",
"esprima": "4.0.1",
"fast-json-patch": "3.1.1",
"glob": "10.3.3",
"glob": "10.3.4",
"image-size": "1.0.2",
"is-mergeable-object": "1.1.1",
"jed": "1.1.1",
"json-merge-patch": "1.0.2",
"os-locale": "5.0.0",
"pino": "8.15.0",
"postcss": "8.4.27",
"postcss": "8.4.29",
"relaxed-json": "1.0.3",
"semver": "7.5.4",
"sha.js": "2.4.11",
@ -1127,6 +1163,15 @@
"node": ">=16.0.0"
}
},
"node_modules/addons-linter/node_modules/@eslint/js": {
"version": "8.48.0",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.48.0.tgz",
"integrity": "sha512-ZSjtmelB7IJfWD2Fvb7+Z+ChTIKWq6kjda95fLcQKNS5aheVHn4IkfgRQE3sIIzTcSLwLcLZUD9UBt+V7+h+Pw==",
"dev": true,
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
}
},
"node_modules/addons-linter/node_modules/addons-scanner-utils": {
"version": "9.3.0",
"resolved": "https://registry.npmjs.org/addons-scanner-utils/-/addons-scanner-utils-9.3.0.tgz",
@ -1170,10 +1215,80 @@
"balanced-match": "^1.0.0"
}
},
"node_modules/addons-linter/node_modules/eslint": {
"version": "8.48.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.48.0.tgz",
"integrity": "sha512-sb6DLeIuRXxeM1YljSe1KEx9/YYeZFQWcV8Rq9HfigmdDEugjLEVEa1ozDjL6YDjBpQHPJxJzze+alxi4T3OLg==",
"dev": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.6.1",
"@eslint/eslintrc": "^2.1.2",
"@eslint/js": "8.48.0",
"@humanwhocodes/config-array": "^0.11.10",
"@humanwhocodes/module-importer": "^1.0.1",
"@nodelib/fs.walk": "^1.2.8",
"ajv": "^6.12.4",
"chalk": "^4.0.0",
"cross-spawn": "^7.0.2",
"debug": "^4.3.2",
"doctrine": "^3.0.0",
"escape-string-regexp": "^4.0.0",
"eslint-scope": "^7.2.2",
"eslint-visitor-keys": "^3.4.3",
"espree": "^9.6.1",
"esquery": "^1.4.2",
"esutils": "^2.0.2",
"fast-deep-equal": "^3.1.3",
"file-entry-cache": "^6.0.1",
"find-up": "^5.0.0",
"glob-parent": "^6.0.2",
"globals": "^13.19.0",
"graphemer": "^1.4.0",
"ignore": "^5.2.0",
"imurmurhash": "^0.1.4",
"is-glob": "^4.0.0",
"is-path-inside": "^3.0.3",
"js-yaml": "^4.1.0",
"json-stable-stringify-without-jsonify": "^1.0.1",
"levn": "^0.4.1",
"lodash.merge": "^4.6.2",
"minimatch": "^3.1.2",
"natural-compare": "^1.4.0",
"optionator": "^0.9.3",
"strip-ansi": "^6.0.1",
"text-table": "^0.2.0"
},
"bin": {
"eslint": "bin/eslint.js"
},
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
},
"funding": {
"url": "https://opencollective.com/eslint"
}
},
"node_modules/addons-linter/node_modules/eslint/node_modules/ajv": {
"version": "6.12.6",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
"integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
"dev": true,
"dependencies": {
"fast-deep-equal": "^3.1.1",
"fast-json-stable-stringify": "^2.0.0",
"json-schema-traverse": "^0.4.1",
"uri-js": "^4.2.2"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/epoberezkin"
}
},
"node_modules/addons-linter/node_modules/glob": {
"version": "10.3.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-10.3.3.tgz",
"integrity": "sha512-92vPiMb/iqpmEgsOoIDvTjc50wf9CCCvMzsi6W0JLPeUKE8TWP1a73PgqSrqy7iAZxaSD1YdzU7QZR5LF51MJw==",
"version": "10.3.4",
"resolved": "https://registry.npmjs.org/glob/-/glob-10.3.4.tgz",
"integrity": "sha512-6LFElP3A+i/Q8XQKEvZjkEWEOTgAIALR9AO2rwT8bgPhDd1anmqDJDZ6lLddI4ehxxxR1S5RIqKe1uapMQfYaQ==",
"dev": true,
"dependencies": {
"foreground-child": "^3.1.0",
@ -1192,7 +1307,7 @@
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/addons-linter/node_modules/minimatch": {
"node_modules/addons-linter/node_modules/glob/node_modules/minimatch": {
"version": "9.0.3",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
"integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
@ -1207,6 +1322,12 @@
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/addons-linter/node_modules/json-schema-traverse": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
"dev": true
},
"node_modules/addons-linter/node_modules/node-fetch": {
"version": "2.6.11",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz",
@ -1229,34 +1350,6 @@
}
}
},
"node_modules/addons-linter/node_modules/postcss": {
"version": "8.4.27",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.27.tgz",
"integrity": "sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==",
"dev": true,
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/postcss/"
},
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/postcss"
},
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
],
"dependencies": {
"nanoid": "^3.3.6",
"picocolors": "^1.0.0",
"source-map-js": "^1.0.2"
},
"engines": {
"node": "^10 || ^12 || >=14"
}
},
"node_modules/addons-moz-compare": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/addons-moz-compare/-/addons-moz-compare-1.3.0.tgz",
@ -1312,6 +1405,18 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/ansi-escapes/node_modules/type-fest": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz",
"integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==",
"dev": true,
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/ansi-regex": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
@ -1342,6 +1447,15 @@
"integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==",
"dev": true
},
"node_modules/are-docs-informative": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/are-docs-informative/-/are-docs-informative-0.0.2.tgz",
"integrity": "sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==",
"dev": true,
"engines": {
"node": ">=14"
}
},
"node_modules/arg": {
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
@ -1724,6 +1838,18 @@
"integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
"dev": true
},
"node_modules/builtin-modules": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz",
"integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==",
"dev": true,
"engines": {
"node": ">=6"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/bunyan": {
"version": "1.8.15",
"resolved": "https://registry.npmjs.org/bunyan/-/bunyan-1.8.15.tgz",
@ -1897,18 +2023,6 @@
"node": ">=12.13.0"
}
},
"node_modules/chrome-launcher/node_modules/escape-string-regexp": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
"integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
"dev": true,
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/ci-info": {
"version": "3.8.0",
"resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz",
@ -1924,6 +2038,27 @@
"node": ">=8"
}
},
"node_modules/clean-regexp": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/clean-regexp/-/clean-regexp-1.0.0.tgz",
"integrity": "sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==",
"dev": true,
"dependencies": {
"escape-string-regexp": "^1.0.5"
},
"engines": {
"node": ">=4"
}
},
"node_modules/clean-regexp/node_modules/escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
"dev": true,
"engines": {
"node": ">=0.8.0"
}
},
"node_modules/cli-boxes": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz",
@ -1949,9 +2084,9 @@
}
},
"node_modules/cli-spinners": {
"version": "2.9.0",
"resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.0.tgz",
"integrity": "sha512-4/aL9X3Wh0yiMQlE+eeRhWP6vclO3QRtw1JHKIT0FFUs5FjpFmESqtMvYZ0+lbzBw900b95mS0hohy+qn2VK/g==",
"version": "2.9.1",
"resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.1.tgz",
"integrity": "sha512-jHgecW0pxkonBJdrKsqxgRX9AcG+u/5k0Q7WPDfi8AogLAdwxEkyYYNWwZ5GvVFoFx2uiY1eNcSK00fh+1+FyQ==",
"dev": true,
"engines": {
"node": ">=6"
@ -2067,6 +2202,15 @@
"node": "^12.20.0 || >=14"
}
},
"node_modules/comment-parser": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.0.tgz",
"integrity": "sha512-QLyTNiZ2KDOibvFPlZ6ZngVsZ/0gYnE6uTXi5aoDg8ed3AkJAz4sEje3Y8a29hQ1s6A99MZXe47fLAXQ1rTqaw==",
"dev": true,
"engines": {
"node": ">= 12.0.0"
}
},
"node_modules/commitizen": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/commitizen/-/commitizen-4.3.0.tgz",
@ -2356,9 +2500,9 @@
"dev": true
},
"node_modules/cosmiconfig": {
"version": "8.3.4",
"resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.4.tgz",
"integrity": "sha512-SF+2P8+o/PTV05rgsAjDzL4OFdVXAulSfC/L19VaeVT7+tpOOSscCt2QLxDZ+CLxF2WOiq6y1K5asvs8qUJT/Q==",
"version": "8.3.6",
"resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz",
"integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==",
"dev": true,
"dependencies": {
"import-fresh": "^3.3.0",
@ -2566,6 +2710,15 @@
"integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==",
"dev": true
},
"node_modules/cz-conventional-changelog/node_modules/escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
"dev": true,
"engines": {
"node": ">=0.8.0"
}
},
"node_modules/cz-conventional-changelog/node_modules/has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
@ -3009,25 +3162,28 @@
}
},
"node_modules/escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
"integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
"dev": true,
"engines": {
"node": ">=0.8.0"
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/eslint": {
"version": "8.46.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.46.0.tgz",
"integrity": "sha512-cIO74PvbW0qU8e0mIvk5IV3ToWdCq5FYG6gWPHHkx6gNdjlbAYvtfHmlCMXxjcoVaIdwy/IAt3+mDkZkfvb2Dg==",
"version": "8.49.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.49.0.tgz",
"integrity": "sha512-jw03ENfm6VJI0jA9U+8H5zfl5b+FvuU3YYvZRdZHOlU2ggJkxrlkJH4HcDrZpj6YwD8kuYqvQM8LyesoazrSOQ==",
"dev": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.6.1",
"@eslint/eslintrc": "^2.1.1",
"@eslint/js": "^8.46.0",
"@humanwhocodes/config-array": "^0.11.10",
"@eslint/eslintrc": "^2.1.2",
"@eslint/js": "8.49.0",
"@humanwhocodes/config-array": "^0.11.11",
"@humanwhocodes/module-importer": "^1.0.1",
"@nodelib/fs.walk": "^1.2.8",
"ajv": "^6.12.4",
@ -3037,7 +3193,7 @@
"doctrine": "^3.0.0",
"escape-string-regexp": "^4.0.0",
"eslint-scope": "^7.2.2",
"eslint-visitor-keys": "^3.4.2",
"eslint-visitor-keys": "^3.4.3",
"espree": "^9.6.1",
"esquery": "^1.4.2",
"esutils": "^2.0.2",
@ -3071,6 +3227,29 @@
"url": "https://opencollective.com/eslint"
}
},
"node_modules/eslint-plugin-jsdoc": {
"version": "46.6.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-46.6.0.tgz",
"integrity": "sha512-T/1gzsvnX45qABzyPEonEhFDttkTn7Igm/X89TXIkTLBOsNl2GYtyBqQPZGXZZ8J5VBzEhiCMvI2P2kXX4dnFw==",
"dev": true,
"dependencies": {
"@es-joy/jsdoccomment": "~0.40.1",
"are-docs-informative": "^0.0.2",
"comment-parser": "1.4.0",
"debug": "^4.3.4",
"escape-string-regexp": "^4.0.0",
"esquery": "^1.5.0",
"is-builtin-module": "^3.2.1",
"semver": "^7.5.4",
"spdx-expression-parse": "^3.0.1"
},
"engines": {
"node": ">=16"
},
"peerDependencies": {
"eslint": "^7.0.0 || ^8.0.0"
}
},
"node_modules/eslint-plugin-no-unsanitized": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/eslint-plugin-no-unsanitized/-/eslint-plugin-no-unsanitized-4.0.2.tgz",
@ -3080,6 +3259,38 @@
"eslint": "^6 || ^7 || ^8"
}
},
"node_modules/eslint-plugin-unicorn": {
"version": "48.0.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-48.0.1.tgz",
"integrity": "sha512-FW+4r20myG/DqFcCSzoumaddKBicIPeFnTrifon2mWIzlfyvzwyqZjqVP7m4Cqr/ZYisS2aiLghkUWaPg6vtCw==",
"dev": true,
"dependencies": {
"@babel/helper-validator-identifier": "^7.22.5",
"@eslint-community/eslint-utils": "^4.4.0",
"ci-info": "^3.8.0",
"clean-regexp": "^1.0.0",
"esquery": "^1.5.0",
"indent-string": "^4.0.0",
"is-builtin-module": "^3.2.1",
"jsesc": "^3.0.2",
"lodash": "^4.17.21",
"pluralize": "^8.0.0",
"read-pkg-up": "^7.0.1",
"regexp-tree": "^0.1.27",
"regjsparser": "^0.10.0",
"semver": "^7.5.4",
"strip-indent": "^3.0.0"
},
"engines": {
"node": ">=16"
},
"funding": {
"url": "https://github.com/sindresorhus/eslint-plugin-unicorn?sponsor=1"
},
"peerDependencies": {
"eslint": ">=8.44.0"
}
},
"node_modules/eslint-scope": {
"version": "7.2.2",
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz",
@ -3097,9 +3308,9 @@
}
},
"node_modules/eslint-visitor-keys": {
"version": "3.4.2",
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.2.tgz",
"integrity": "sha512-8drBzUEyZ2llkpCA67iYrgEssKDUu68V8ChqqOfFupIaG/LCVPUT+CoGJpT77zJprs4T/W7p07LP7zAIMuweVw==",
"version": "3.4.3",
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz",
"integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==",
"dev": true,
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@ -3124,30 +3335,6 @@
"url": "https://github.com/sponsors/epoberezkin"
}
},
"node_modules/eslint/node_modules/escape-string-regexp": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
"integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
"dev": true,
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/eslint/node_modules/glob-parent": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
"integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",
"dev": true,
"dependencies": {
"is-glob": "^4.0.3"
},
"engines": {
"node": ">=10.13.0"
}
},
"node_modules/eslint/node_modules/json-schema-traverse": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
@ -3330,6 +3517,18 @@
"node": ">=8.6.0"
}
},
"node_modules/fast-glob/node_modules/glob-parent": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
"dev": true,
"dependencies": {
"is-glob": "^4.0.1"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/fast-json-patch": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-3.1.1.tgz",
@ -3422,6 +3621,15 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/figures/node_modules/escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
"dev": true,
"engines": {
"node": ">=0.8.0"
}
},
"node_modules/file-entry-cache": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
@ -3882,15 +4090,15 @@
}
},
"node_modules/glob-parent": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
"integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",
"dev": true,
"dependencies": {
"is-glob": "^4.0.1"
"is-glob": "^4.0.3"
},
"engines": {
"node": ">= 6"
"node": ">=10.13.0"
}
},
"node_modules/glob-to-regexp": {
@ -3968,18 +4176,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/globals/node_modules/type-fest": {
"version": "0.20.2",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz",
"integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",
"dev": true,
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/globby": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz",
@ -4460,6 +4656,21 @@
"integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==",
"dev": true
},
"node_modules/is-builtin-module": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz",
"integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==",
"dev": true,
"dependencies": {
"builtin-modules": "^3.3.0"
},
"engines": {
"node": ">=6"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/is-ci": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz",
@ -4803,6 +5014,27 @@
"integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==",
"dev": true
},
"node_modules/jsdoc-type-pratt-parser": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.0.0.tgz",
"integrity": "sha512-YtOli5Cmzy3q4dP26GraSOeAhqecewG04hoO8DY56CH4KJ9Fvv5qKWUCCo3HZob7esJQHCv6/+bnTy72xZZaVQ==",
"dev": true,
"engines": {
"node": ">=12.0.0"
}
},
"node_modules/jsesc": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz",
"integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==",
"dev": true,
"bin": {
"jsesc": "bin/jsesc"
},
"engines": {
"node": ">=6"
}
},
"node_modules/json-buffer": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",
@ -5591,9 +5823,9 @@
}
},
"node_modules/nan": {
"version": "2.17.0",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz",
"integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==",
"version": "2.18.0",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz",
"integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==",
"dev": true,
"optional": true
},
@ -6276,6 +6508,15 @@
"integrity": "sha512-cHjPPsE+vhj/tnhCy/wiMh3M3z3h/j15zHQX+S9GkTBgqJuTuJzYJ4gUyACLhDaJ7kk9ba9iRDmbH2tJU03OiA==",
"dev": true
},
"node_modules/pluralize": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz",
"integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==",
"dev": true,
"engines": {
"node": ">=4"
}
},
"node_modules/postcss": {
"version": "8.4.29",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.29.tgz",
@ -6681,6 +6922,15 @@
"integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==",
"dev": true
},
"node_modules/regexp-tree": {
"version": "0.1.27",
"resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.27.tgz",
"integrity": "sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==",
"dev": true,
"bin": {
"regexp-tree": "bin/regexp-tree"
}
},
"node_modules/registry-auth-token": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-5.0.2.tgz",
@ -6708,6 +6958,27 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/regjsparser": {
"version": "0.10.0",
"resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.10.0.tgz",
"integrity": "sha512-qx+xQGZVsy55CH0a1hiVwHmqjLryfh7wQyF5HO07XJ9f7dQMY/gPQHhlyDkIzJKC+x2fUCpCcUODUUUFrm7SHA==",
"dev": true,
"dependencies": {
"jsesc": "~0.5.0"
},
"bin": {
"regjsparser": "bin/parser"
}
},
"node_modules/regjsparser/node_modules/jsesc": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
"integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==",
"dev": true,
"bin": {
"jsesc": "bin/jsesc"
}
},
"node_modules/relaxed-json": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/relaxed-json/-/relaxed-json-1.0.3.tgz",
@ -6771,6 +7042,15 @@
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
"dev": true
},
"node_modules/relaxed-json/node_modules/escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
"dev": true,
"engines": {
"node": ">=0.8.0"
}
},
"node_modules/relaxed-json/node_modules/has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
@ -8074,9 +8354,9 @@
}
},
"node_modules/type-fest": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz",
"integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==",
"version": "0.20.2",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz",
"integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",
"dev": true,
"engines": {
"node": ">=10"
@ -8264,14 +8544,14 @@
}
},
"node_modules/web-ext": {
"version": "7.6.2",
"resolved": "https://registry.npmjs.org/web-ext/-/web-ext-7.6.2.tgz",
"integrity": "sha512-xlxbzgFBIS/UWWlvWxyR1PIqRRzDj1cutoHh+VZu4ZTcJTfv35KVdKkLRZv4PQwHu4dg8VfTg7WEcNP4QLaaFQ==",
"version": "7.7.0",
"resolved": "https://registry.npmjs.org/web-ext/-/web-ext-7.7.0.tgz",
"integrity": "sha512-/jc0kbSLfw/ANra6v70I6QADrVYL0Wo98T0Cigt39EjVpXbiwES8zww/9QL7aE0L1tK0ISWYq45KNisDV+GKVA==",
"dev": true,
"dependencies": {
"@babel/runtime": "7.21.0",
"@devicefarmer/adbkit": "3.2.3",
"addons-linter": "5.32.0",
"addons-linter": "6.13.0",
"bunyan": "1.8.15",
"camelcase": "7.0.1",
"chrome-launcher": "0.15.1",

View File

@ -1,7 +1,7 @@
{
"name": "usrspace-browser-addon",
"description": "WebExtension for the Hacker-/Maker-Space /usr/space",
"version": "0.9.3",
"version": "0.9.4",
"dependencies": {
"webextension-polyfill": "^0.10.0"
},
@ -11,18 +11,17 @@
"@commitlint/cz-commitlint": "^17.7.1",
"@types/firefox-webext-browser": "^111.0.1",
"commitizen": "^4.3.0",
"eslint": "^8.49.0",
"eslint-plugin-jsdoc": "^46.6.0",
"eslint-plugin-no-unsanitized": "^4.0.2",
"eslint-plugin-unicorn": "^48.0.1",
"git-cliff": "^1.3.0",
"husky": "^8.0.3",
"stylelint": "^15.10.3",
"stylelint-config-standard": "^34.0.0",
"stylelint-plugin-defensive-css": "^0.8.1",
"stylelint-plugin-logical-css": "^0.13.2",
"web-ext": "^7.6.2"
},
"overrides": {
"web-ext@^7.6.2": {
"addons-linter": "^6.12.0"
}
"web-ext": "^7.7.0"
},
"scripts": {
"copy-browser-polyfill": "cp node_modules/webextension-polyfill/dist/browser-polyfill.js src/browser-polyfill.js",
@ -30,8 +29,9 @@
"uninject-browser-polyfill": "sed -i -r \"s#import '\\./browser-polyfill\\.js';#// \\[INJECT-BROWSER-POLYFILL]#\" src/*.js",
"copy-version": "sed -i 's/^\t\"version\": \".*\",$/\t\"version\": \"'$(rg '^\t\"version\": \"(.+)\",$' -r '$1' < package.json)'\",/' src/manifest.json",
"update-changelog": "npm exec git-cliff > CHANGELOG.md",
"lint": "npm run lint:web-ext && npm run lint:css",
"lint": "npm run lint:web-ext && npm run lint:js && npm run lint:css",
"lint:web-ext": "web-ext lint -w",
"lint:js": "eslint .",
"lint:css": "stylelint \"src/*.css\"",
"test": "echo \"Error: no test specified\" && exit 0",
"watch:firefox": "web-ext run -t firefox-desktop",
@ -59,7 +59,7 @@
},
"repository": {
"type": "git",
"url": "https://gitea.usrspace.at/XimeX/usrspace-browser-addon"
"url": "https://git.usrspace.at/XimeX/usrspace-browser-addon"
},
"keywords": [
"/usr/space"

View File

@ -2,6 +2,8 @@ import { REFRESH_TIMEOUT, HOMEPAGE, API_URLS, BADGE_COLORS } from './config.js';
// [INJECT-BROWSER-POLYFILL]
browser.runtime.onInstalled.addListener(async (details) => {
init();
if (details.reason === 'install') {
await browser.tabs.create({
url: HOMEPAGE,
@ -9,38 +11,36 @@ browser.runtime.onInstalled.addListener(async (details) => {
}
});
browser.runtime.onStartup.addListener(async () => {
init();
});
browser.alarms.onAlarm.addListener((alarm) => {
if (alarm.name === 'fetchData') {
fetchNewData();
}
});
/**
* @param {string} url
* @returns {Promise<any>}
*/
async function fetchJson(url) {
const response = await fetch(url);
return response.json();
}
/**
* @param {number} days
* @returns {Promise<import("../types").Calendar>}
*/
function fetchCalendar(days = 28) {
let url = `${API_URLS.calender}?o=json`;
async function fetchCalendar(days = 28) {
const params = new URLSearchParams();
params.set('o', 'json');
if (days) {
url += `&r=${days}`;
params.set('r', `${days}`);
}
return fetchJson(url);
const response = await fetch(`${API_URLS.calender}?${params.toString()}`);
return response.json();
}
/**
* @returns {Promise<import("../types").SpaceApi>}
*/
function fetchSpaceApi() {
return fetchJson(API_URLS.spaceApi);
async function fetchSpaceApi() {
const response = await fetch(API_URLS.spaceApi);
return response.json();
}
async function fetchNewData() {
@ -113,5 +113,3 @@ function init() {
periodInMinutes: REFRESH_TIMEOUT,
});
}
init();

View File

@ -26,7 +26,7 @@ export const QUICK_LINKS = [
},
{
iconTemplateId: 'template-icon-git',
url: 'https://gitea.usrspace.at/',
url: 'https://git.usrspace.at/',
text: 'Git',
},
{

View File

@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "__MSG_extensionName__",
"description": "__MSG_extensionDescription__",
"version": "0.9.3",
"version": "0.9.4",
"icons": {
"48": "icons/favicon.svg",
"96": "icons/favicon.svg"
@ -20,7 +20,7 @@
"default_locale": "de",
"permissions": ["alarms", "notifications", "storage"],
"author": "Thomas Rupprecht",
"homepage_url": "https://gitea.usrspace.at/XimeX/usrspace-browser-addon",
"homepage_url": "https://git.usrspace.at/XimeX/usrspace-browser-addon",
"developer": {
"name": "Thomas Rupprecht",
"url": "https://blog.ximex.at/"

View File

@ -1,3 +1,5 @@
@import url('extension.css') layer(extension);
@font-face {
font-family: 'Nunito Sans';
font-style: normal;

View File

@ -3,7 +3,6 @@
<head>
<meta charset="utf-8" />
<title>/usr/space</title>
<link rel="stylesheet" href="extension.css" />
<link rel="stylesheet" href="popup.css" />
<template id="template-icon-closed">

View File

@ -7,19 +7,19 @@ function setL10n() {
document.querySelector('html').setAttribute('lang', browser.i18n.getUILanguage());
const loadingText = browser.i18n.getMessage('loading');
document.getElementById('state').textContent = loadingText;
document.getElementById('calendar').textContent = loadingText;
document.querySelector('#state').textContent = loadingText;
document.querySelector('#calendar').textContent = loadingText;
document.querySelector('#space-api > code').textContent = loadingText;
document.getElementById('currentState').textContent = browser.i18n.getMessage('currentState');
document.getElementById('links').textContent = browser.i18n.getMessage('links');
document.getElementById('nextEvent').textContent = browser.i18n.getMessage('nextEvent');
document.getElementById('spaceApiJson').textContent = browser.i18n.getMessage('spaceApiJson');
document.querySelector('#currentState').textContent = browser.i18n.getMessage('currentState');
document.querySelector('#links').textContent = browser.i18n.getMessage('links');
document.querySelector('#nextEvent').textContent = browser.i18n.getMessage('nextEvent');
document.querySelector('#spaceApiJson').textContent = browser.i18n.getMessage('spaceApiJson');
}
function setLinks() {
const listElement = document.getElementById('link-list');
const listElement = document.querySelector('#link-list');
QUICK_LINKS.forEach((quickLink) => {
for (const quickLink of QUICK_LINKS) {
const template = getCleanTemplateById('template-link-item');
template.querySelector('.link').dataset.url = quickLink.url;
@ -31,7 +31,7 @@ function setLinks() {
template.querySelector('.text').textContent = quickLink.text;
listElement.append(template);
});
}
}
/**
@ -49,10 +49,10 @@ async function init() {
setL10n();
setLinks();
const linkElements = Array.from(document.getElementsByClassName('link'));
linkElements.forEach((linkElement) => {
const linkElements = document.querySelectorAll('.link');
for (const linkElement of linkElements) {
linkElement.addEventListener('click', linkElementClickListener);
});
}
/**
* @type {import("../types").Storage}
@ -73,42 +73,50 @@ await init();
* @param {import("../types").Calendar} nextEvents
*/
function updateNextEvent(nextEvents) {
const calendarElement = document.getElementById('calendar');
calendarElement.innerText = '';
const calendarElement = document.querySelector('#calendar');
calendarElement.textContent = '';
if (nextEvents.length === 0) {
const strongElement = document.createElement('strong');
strongElement.textContent = browser.i18n.getMessage('noEventsInNext4Weeks');
calendarElement.append(strongElement);
} else {
const nextEventDate = nextEvents[0].begin.substring(0, 10);
const nextEventDate = nextEvents[0].begin.slice(0, 10);
const nextEventDateEvents = nextEvents.filter((nextEvent) => (nextEvent.begin.startsWith(nextEventDate)));
nextEventDateEvents.forEach((nextEventDateEvent) => {
const calendarEntryElement = getCleanTemplateById('template-calendar-entry');
calendarEntryElement.querySelector('svg').setAttribute('aria-label', browser.i18n.getMessage('event'));
calendarEntryElement.querySelector('strong').textContent = nextEventDateEvent.name;
const timeElement = calendarEntryElement.querySelector('time');
const beginDate = new Date(nextEventDateEvent.begin);
timeElement.dateTime = beginDate.toISOString();
timeElement.textContent = dateTimeFormat.format(beginDate);
if (nextEventDateEvent.location) {
const locationElement = getCleanTemplateById('template-calendar-entry-location');
locationElement.querySelector('address').textContent = nextEventDateEvent.location;
calendarEntryElement.querySelector('.calendar-entry > div').append(locationElement);
}
calendarElement.append(calendarEntryElement);
});
for (const nextEventDateEvent of nextEventDateEvents) {
calendarElement.append(buildCalendarEntryElement(nextEventDateEvent));
}
}
}
/**
* @param {import("../types").CalendarEntry} nextEventDateEvent
* @returns {DocumentFragment}
*/
function buildCalendarEntryElement(nextEventDateEvent) {
const calendarEntryElement = getCleanTemplateById('template-calendar-entry');
calendarEntryElement.querySelector('svg').setAttribute('aria-label', browser.i18n.getMessage('event'));
calendarEntryElement.querySelector('strong').textContent = nextEventDateEvent.name;
const timeElement = calendarEntryElement.querySelector('time');
const beginDate = new Date(nextEventDateEvent.begin);
timeElement.dateTime = beginDate.toISOString();
timeElement.textContent = dateTimeFormat.format(beginDate);
if (nextEventDateEvent.location) {
const locationElement = getCleanTemplateById('template-calendar-entry-location');
locationElement.querySelector('address').textContent = nextEventDateEvent.location;
calendarEntryElement.querySelector('.calendar-entry > div').append(locationElement);
}
return calendarEntryElement;
}
/**
* @param {import("../types").SpaceApi} spaceApi
*/
@ -136,8 +144,8 @@ function updateState(spaceApi) {
timeElement.dateTime = since.toISOString();
timeElement.textContent = dateTimeFormat.format(since);
const stateElement = document.getElementById('state');
stateElement.innerText = '';
const stateElement = document.querySelector('#state');
stateElement.textContent = '';
stateElement.append(stateElements);
}
@ -146,11 +154,11 @@ function updateState(spaceApi) {
* @returns {DocumentFragment}
*/
function getCleanTemplateById(templateId) {
const template = document.getElementById(templateId).content.cloneNode(true);
const template = document.querySelector(`#${templateId}`).content.cloneNode(true);
if (template.hasChildNodes()) {
for (const childNode of template.childNodes) {
if (childNode.nodeType !== Node.ELEMENT_NODE) {
template.removeChild(childNode);
childNode.remove();
}
}
}

22
types.d.ts vendored
View File

@ -3,17 +3,17 @@ export type Storage = {
spaceApi?: SpaceApi | undefined;
};
export type Calendar = CalendarEntry[];
type CalendarEntry = {
begin: string;
begin_date: `${number}.${number}.${number}`;
begin_time: `${number}:${number}`;
end: string;
end_date: `${number}.${number}.${number}`;
end_time: `${number}:${number}`;
name: string;
description: string | null;
location: string | null;
export type Calendar = readonly CalendarEntry[];
export type CalendarEntry = {
readonly begin: string;
readonly begin_date: `${number}.${number}.${number}`;
readonly begin_time: `${number}:${number}`;
readonly end: string;
readonly end_date: `${number}.${number}.${number}`;
readonly end_time: `${number}:${number}`;
readonly name: string;
readonly description: string | null;
readonly location: string | null;
};
/**