Skip to content

Commit

Permalink
chore: upgrade packages
Browse files Browse the repository at this point in the history
  • Loading branch information
khmm12 committed Sep 18, 2024
1 parent 70fd17c commit ba09551
Show file tree
Hide file tree
Showing 20 changed files with 1,860 additions and 1,833 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ dist

# Tests
coverage

# Temp files
.tmp
17 changes: 10 additions & 7 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,36 @@ import prettier from 'eslint-plugin-prettier/recommended'
import globals from 'globals'
import tseslint from 'typescript-eslint'

// @ts-expect-error: the package doesn't have type definitions, nice to have, but not critical.
const importPlugin = await import('eslint-plugin-import')

export default tseslint.config(
lovePreset,

// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
prettier,
{
files: ['**/*.{js,mjs,cjs}', '**/*.{ts,tsx,mts,cts}'],
files: ['**/*.{js,mjs,cjs}', '**/*.{ts,tsx,mts,cts}', '*.{js,mjs,cjs}'],
},
{
ignores: ['dist/', 'vite.config.ts.timestamp-*.mjs'],
},
{
languageOptions: {
globals: globals.webextensions,
parserOptions: {
project: ['./tsconfig.json', './tsconfig.node.json'],
sourceType: 'module',
createDefaultProgram: true,
},
},
settings: {
...importPlugin.configs.typescript.settings,
...importPlugin.configs?.typescript.settings,
},
},
{
rules: {
'@typescript-eslint/no-magic-numbers': 'off', // too many false positives
'@typescript-eslint/init-declarations': 'off', // too many false positives
'@typescript-eslint/no-empty-function': 'off', // useless,
'@typescript-eslint/class-methods-use-this': 'off', // useless,
'@typescript-eslint/no-deprecated': 'off', // false positives, example: chrome namespace

'import/order': [
'error',
{
Expand Down
8 changes: 4 additions & 4 deletions lib/vite/manifest-plugin.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fs from 'node:fs/promises'
import { resolve as resolvePath } from 'node:path'
import { type Plugin } from 'vite'
import type { Plugin } from 'vite'

interface ManifestPluginOptions {
sourcePath: string
Expand Down Expand Up @@ -31,14 +31,14 @@ async function generateManifest(options: ManifestPluginOptions): Promise<string>
const version = options.version ?? packageVersion

return JSON.stringify({
...(JSON.parse(originalSource) as Record<string, any>),
...(JSON.parse(originalSource) as Record<string, unknown>),
version,
})
}

async function getPackageVersion(): Promise<string> {
const content = await fs.readFile(resolvePath(process.cwd(), './package.json'), 'utf-8')
const { version } = JSON.parse(content) as Record<string, any>
const { version } = JSON.parse(content) as Record<string, unknown>

return version
return version as string
}
69 changes: 36 additions & 33 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
"scripts": {
"dev": "vite",
"build": "vite build",
"test": "run-p --aggregate-output lint typecheck \"unit-tests --run --silent\"",
"test": "run-p --aggregate-output lint typecheck:* \"unit-tests --run --silent\"",
"unit-tests": "vitest",
"lint": "eslint .",
"typecheck": "tsc --noEmit --pretty --project ."
"typecheck": "run-p --aggregate-output typecheck:app typecheck:node",
"typecheck:app": "tsc --noEmit --pretty --project tsconfig.app.json",
"typecheck:node": "tsc --noEmit --pretty --project tsconfig.node.json"
},
"sideEffects": [
"src/index.tsx",
Expand All @@ -22,51 +24,52 @@
],
"dependencies": {
"@linaria/core": "^6.2.0",
"@modular-forms/solid": "^0.21.0",
"@total-typescript/ts-reset": "^0.5.1",
"date-fns": "^3.6.0",
"focus-trap": "^7.5.4",
"@modular-forms/solid": "^0.23.0",
"@total-typescript/ts-reset": "^0.6.1",
"date-fns": "^4.1.0",
"focus-trap": "^7.6.0",
"polished": "^4.3.1",
"remeda": "^2.2.0",
"solid-js": "1.8.17",
"remeda": "^2.14.0",
"solid-js": "1.8.22",
"solid-transition-group": "^0.2.3",
"type-fest": "^4.20.1",
"valibot": "^0.34.0"
"type-fest": "^4.26.1",
"valibot": "^0.42.0"
},
"devDependencies": {
"@linaria/vite": "^5.0.4",
"@solidjs/testing-library": "0.8.8",
"@testing-library/dom": "10.2.0",
"@testing-library/jest-dom": "^6.4.6",
"@solidjs/testing-library": "0.8.9",
"@testing-library/dom": "10.4.0",
"@testing-library/jest-dom": "^6.5.0",
"@testing-library/user-event": "^14.5.2",
"@types/chrome": "^0.0.268",
"@types/node": "^20.14.8",
"@vitest/coverage-v8": "^1.6.0",
"@wyw-in-js/vite": "^0.5.3",
"autoprefixer": "^10.4.19",
"browserslist": "^4.23.1",
"@tsconfig/node20": "^20.1.4",
"@types/chrome": "^0.0.271",
"@types/node": "^20.16.5",
"@vitest/coverage-v8": "^2.1.1",
"@wyw-in-js/vite": "^0.5.4",
"autoprefixer": "^10.4.20",
"browserslist": "^4.23.3",
"browserslist-to-esbuild": "^2.1.1",
"eslint": "8.57.0",
"eslint-config-love": "^53.0.0",
"eslint-config-love": "^66.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5.1.3",
"globals": "^15.6.0",
"happy-dom": "^14.12.3",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-import": "^2.30.0",
"eslint-plugin-prettier": "^5.2.1",
"globals": "^15.9.0",
"happy-dom": "^15.7.4",
"npm-run-all": "^4.1.5",
"prettier": "^3.3.2",
"stylis": "^3",
"typescript": "5.5.2",
"typescript-eslint": "^7.14.1",
"vite": "^5.3.1",
"prettier": "^3.3.3",
"stylis": "^3.5.4",
"typescript": "~5.5.4",
"typescript-eslint": "^8.6.0",
"vite": "^5.4.6",
"vite-bundle-visualizer": "^1.2.1",
"vite-plugin-html": "^3.2.2",
"vite-plugin-solid": "2.10.2",
"vite-plugin-static-copy": "^1.0.5",
"vitest": "^1.6.0"
"vite-plugin-static-copy": "^1.0.6",
"vitest": "^2.1.1"
},
"packageManager": "pnpm@9.4.0+sha512.f549b8a52c9d2b8536762f99c0722205efc5af913e77835dbccc3b0b0b2ca9e7dc8022b78062c17291c48e88749c70ce88eb5a74f1fa8c4bf5e18bb46c8bd83a",
"packageManager": "pnpm@9.10.0+sha512.73a29afa36a0d092ece5271de5177ecbf8318d454ecd701343131b8ebc0c1a91c487da46ab77c8e596d6acf1461e3594ced4becedf8921b074fbd8653ed7051c",
"pnpm": {
"patchedDependencies": {
"solid-transition-group@0.2.3": "patches/solid-transition-group@0.2.3.patch"
Expand Down
Loading

0 comments on commit ba09551

Please sign in to comment.