Skip to content

Commit

Permalink
update deps for PBR & PBU (#1450)
Browse files Browse the repository at this point in the history
- update vite
- update some dependencies
- fix ESM-only in tests (from `vite-tsconfig-paths`)
- use vitest for core
- remove jest
  • Loading branch information
irahopkinson authored Feb 23, 2025
1 parent 23c4607 commit 0f0bea8
Show file tree
Hide file tree
Showing 77 changed files with 7,149 additions and 6,424 deletions.
4 changes: 4 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ module.exports = {
// https://github.com/electron-react-boilerplate/eslint-config-erb/blob/main/index.js
// airbnb rules are embedded in erb https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb
'erb',
// https://github.com/import-js/eslint-plugin-import?tab=readme-ov-file#typescript
'plugin:import/recommended',
'plugin:import/typescript',
// https://github.com/storybookjs/eslint-plugin-storybook/blob/main/lib/configs/recommended.ts
'plugin:storybook/recommended',
// Make sure this is last so it gets the chance to override other configs.
Expand All @@ -17,6 +20,7 @@ module.exports = {

// Use `noImplicitReturns` instead. See https://typescript-eslint.io/rules/consistent-return/.
'consistent-return': 'off',
'import/default': 'off',
'import/extensions': 'off',
// A temporary hack related to IDE not resolving correct package.json
'import/no-extraneous-dependencies': 'off',
Expand Down
4 changes: 2 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"dbaeumer.vscode-eslint",
"editorconfig.editorconfig",
"esbenp.prettier-vscode",
"firsttris.vscode-jest-runner",
"formulahendry.dotnet-test-explorer",
"mrmlnc.vscode-json5",
"ms-dotnettools.csdevkit",
"streetsidesoftware.code-spell-checker",
"stylelint.vscode-stylelint"
"stylelint.vscode-stylelint",
"vitest.explorer"
]
}
4 changes: 4 additions & 0 deletions extensions/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ module.exports = {
// https://github.com/electron-react-boilerplate/eslint-config-erb/blob/main/index.js
// airbnb rules are embedded in erb https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb
'erb',
// https://github.com/import-js/eslint-plugin-import?tab=readme-ov-file#typescript
'plugin:import/recommended',
'plugin:import/typescript',
// Make sure this is last so it gets the chance to override other configs.
// See https://github.com/prettier/eslint-config-prettier and https://github.com/prettier/eslint-plugin-prettier
'plugin:prettier/recommended',
Expand All @@ -18,6 +21,7 @@ module.exports = {

// Use `noImplicitReturns` instead. See https://typescript-eslint.io/rules/consistent-return/.
'consistent-return': 'off',
'import/default': 'off',
'import/extensions': 'off',
// A temporary hack related to IDE not resolving correct package.json
'import/no-extraneous-dependencies': 'off',
Expand Down
4 changes: 2 additions & 2 deletions extensions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"build:types": "cd .. && npm run build:types",
"start:core": "cd .. && npm run start",
"start": "npm run start:core",
"lint": "npm run lint:scripts --max-old-space-size=4096 && npm run lint:styles",
"lint:scripts": "cross-env NODE_OPTIONS=\"--max-old-space-size=4096\" NODE_ENV=development eslint --ext .cjs,.js,.jsx,.ts,.tsx --cache .",
"lint": "npm run lint:scripts && npm run lint:styles",
"lint:scripts": "cross-env NODE_OPTIONS=\"--max-old-space-size=8192\" NODE_ENV=development eslint --ext .cjs,.js,.jsx,.ts,.tsx --cache .",
"lint:styles": "stylelint **/*.{css,scss}",
"lint-fix": "npm run lint-fix:scripts && npm run lint:styles -- --fix",
"lint-fix:scripts": "npm run format && npm run lint:scripts",
Expand Down
4 changes: 4 additions & 0 deletions extensions/src/hello-someone/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ module.exports = {
// https://github.com/electron-react-boilerplate/eslint-config-erb/blob/main/index.js
// airbnb rules are embedded in erb https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb
'erb',
// https://github.com/import-js/eslint-plugin-import?tab=readme-ov-file#typescript
'plugin:import/recommended',
'plugin:import/typescript',
// Make sure this is last so it gets the chance to override other configs.
// See https://github.com/prettier/eslint-config-prettier and https://github.com/prettier/eslint-plugin-prettier
'plugin:prettier/recommended',
Expand All @@ -18,6 +21,7 @@ module.exports = {

// Use `noImplicitReturns` instead. See https://typescript-eslint.io/rules/consistent-return/.
'consistent-return': 'off',
'import/default': 'off',
'import/extensions': 'off',
// A temporary hack related to IDE not resolving correct package.json
'import/no-extraneous-dependencies': 'off',
Expand Down
1 change: 0 additions & 1 deletion extensions/src/hello-someone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
"eslint-import-resolver-typescript": "^3.7.0",
"eslint-plugin-compat": "^4.2.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-no-null": "^1.0.2",
"eslint-plugin-no-type-assertion": "^1.3.0",
Expand Down
4 changes: 4 additions & 0 deletions extensions/src/hello-world/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ module.exports = {
// https://github.com/electron-react-boilerplate/eslint-config-erb/blob/main/index.js
// airbnb rules are embedded in erb https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb
'erb',
// https://github.com/import-js/eslint-plugin-import?tab=readme-ov-file#typescript
'plugin:import/recommended',
'plugin:import/typescript',
// Make sure this is last so it gets the chance to override other configs.
// See https://github.com/prettier/eslint-config-prettier and https://github.com/prettier/eslint-plugin-prettier
'plugin:prettier/recommended',
Expand All @@ -18,6 +21,7 @@ module.exports = {

// Use `noImplicitReturns` instead. See https://typescript-eslint.io/rules/consistent-return/.
'consistent-return': 'off',
'import/default': 'off',
'import/extensions': 'off',
// A temporary hack related to IDE not resolving correct package.json
'import/no-extraneous-dependencies': 'off',
Expand Down
1 change: 0 additions & 1 deletion extensions/src/hello-world/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
"eslint-import-resolver-typescript": "^3.7.0",
"eslint-plugin-compat": "^4.2.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-no-null": "^1.0.2",
"eslint-plugin-no-type-assertion": "^1.3.0",
Expand Down
4 changes: 4 additions & 0 deletions extensions/src/legacy-comment-manager/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ module.exports = {
// https://github.com/electron-react-boilerplate/eslint-config-erb/blob/main/index.js
// airbnb rules are embedded in erb https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb
'erb',
// https://github.com/import-js/eslint-plugin-import?tab=readme-ov-file#typescript
'plugin:import/recommended',
'plugin:import/typescript',
// Make sure this is last so it gets the chance to override other configs.
// See https://github.com/prettier/eslint-config-prettier and https://github.com/prettier/eslint-plugin-prettier
'plugin:prettier/recommended',
Expand All @@ -18,6 +21,7 @@ module.exports = {

// Use `noImplicitReturns` instead. See https://typescript-eslint.io/rules/consistent-return/.
'consistent-return': 'off',
'import/default': 'off',
'import/extensions': 'off',
// A temporary hack related to IDE not resolving correct package.json
'import/no-extraneous-dependencies': 'off',
Expand Down
1 change: 0 additions & 1 deletion extensions/src/legacy-comment-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
"eslint-import-resolver-typescript": "^3.7.0",
"eslint-plugin-compat": "^4.2.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-no-null": "^1.0.2",
"eslint-plugin-no-type-assertion": "^1.3.0",
Expand Down
4 changes: 4 additions & 0 deletions extensions/src/paratext-registration/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ module.exports = {
// https://github.com/electron-react-boilerplate/eslint-config-erb/blob/main/index.js
// airbnb rules are embedded in erb https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb
'erb',
// https://github.com/import-js/eslint-plugin-import?tab=readme-ov-file#typescript
'plugin:import/recommended',
'plugin:import/typescript',
// Make sure this is last so it gets the chance to override other configs.
// See https://github.com/prettier/eslint-config-prettier and https://github.com/prettier/eslint-plugin-prettier
'plugin:prettier/recommended',
Expand All @@ -18,6 +21,7 @@ module.exports = {

// Use `noImplicitReturns` instead. See https://typescript-eslint.io/rules/consistent-return/.
'consistent-return': 'off',
'import/default': 'off',
'import/extensions': 'off',
// A temporary hack related to IDE not resolving correct package.json
'import/no-extraneous-dependencies': 'off',
Expand Down
1 change: 0 additions & 1 deletion extensions/src/paratext-registration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
"eslint-import-resolver-typescript": "^3.7.0",
"eslint-plugin-compat": "^4.2.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-no-null": "^1.0.2",
"eslint-plugin-no-type-assertion": "^1.3.0",
Expand Down
4 changes: 4 additions & 0 deletions extensions/src/platform-get-resources/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ module.exports = {
// https://github.com/electron-react-boilerplate/eslint-config-erb/blob/main/index.js
// airbnb rules are embedded in erb https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb
'erb',
// https://github.com/import-js/eslint-plugin-import?tab=readme-ov-file#typescript
'plugin:import/recommended',
'plugin:import/typescript',
// Make sure this is last so it gets the chance to override other configs.
// See https://github.com/prettier/eslint-config-prettier and https://github.com/prettier/eslint-plugin-prettier
'plugin:prettier/recommended',
Expand All @@ -18,6 +21,7 @@ module.exports = {

// Use `noImplicitReturns` instead. See https://typescript-eslint.io/rules/consistent-return/.
'consistent-return': 'off',
'import/default': 'off',
'import/extensions': 'off',
// A temporary hack related to IDE not resolving correct package.json
'import/no-extraneous-dependencies': 'off',
Expand Down
1 change: 0 additions & 1 deletion extensions/src/platform-get-resources/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
"eslint-import-resolver-typescript": "^3.7.0",
"eslint-plugin-compat": "^4.2.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-no-null": "^1.0.2",
"eslint-plugin-no-type-assertion": "^1.3.0",
Expand Down
3 changes: 1 addition & 2 deletions extensions/src/platform-get-resources/src/home.web-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import {
DropdownMenuItem,
DropdownMenuTrigger,
Label,
LocalizeKey,
SearchBar,
Spinner,
Table,
Expand All @@ -33,7 +32,7 @@ import {
useEvent,
usePromise,
} from 'platform-bible-react';
import { formatTimeSpan, getErrorMessage } from 'platform-bible-utils';
import { formatTimeSpan, getErrorMessage, LocalizeKey } from 'platform-bible-utils';
import { EditedStatus } from 'platform-get-resources';
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';

Expand Down
4 changes: 4 additions & 0 deletions extensions/src/platform-scripture-editor/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ module.exports = {
// https://github.com/electron-react-boilerplate/eslint-config-erb/blob/main/index.js
// airbnb rules are embedded in erb https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb
'erb',
// https://github.com/import-js/eslint-plugin-import?tab=readme-ov-file#typescript
'plugin:import/recommended',
'plugin:import/typescript',
// Make sure this is last so it gets the chance to override other configs.
// See https://github.com/prettier/eslint-config-prettier and https://github.com/prettier/eslint-plugin-prettier
'plugin:prettier/recommended',
Expand All @@ -18,6 +21,7 @@ module.exports = {

// Use `noImplicitReturns` instead. See https://typescript-eslint.io/rules/consistent-return/.
'consistent-return': 'off',
'import/default': 'off',
'import/extensions': 'off',
// A temporary hack related to IDE not resolving correct package.json
'import/no-extraneous-dependencies': 'off',
Expand Down
1 change: 0 additions & 1 deletion extensions/src/platform-scripture-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
"eslint-import-resolver-typescript": "^3.7.0",
"eslint-plugin-compat": "^4.2.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-no-null": "^1.0.2",
"eslint-plugin-no-type-assertion": "^1.3.0",
Expand Down
4 changes: 4 additions & 0 deletions extensions/src/platform-scripture/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ module.exports = {
// https://github.com/electron-react-boilerplate/eslint-config-erb/blob/main/index.js
// airbnb rules are embedded in erb https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb
'erb',
// https://github.com/import-js/eslint-plugin-import?tab=readme-ov-file#typescript
'plugin:import/recommended',
'plugin:import/typescript',
// Make sure this is last so it gets the chance to override other configs.
// See https://github.com/prettier/eslint-config-prettier and https://github.com/prettier/eslint-plugin-prettier
'plugin:prettier/recommended',
Expand All @@ -18,6 +21,7 @@ module.exports = {

// Use `noImplicitReturns` instead. See https://typescript-eslint.io/rules/consistent-return/.
'consistent-return': 'off',
'import/default': 'off',
'import/extensions': 'off',
// A temporary hack related to IDE not resolving correct package.json
'import/no-extraneous-dependencies': 'off',
Expand Down
12 changes: 0 additions & 12 deletions extensions/src/platform-scripture/jest.config.ts

This file was deleted.

5 changes: 1 addition & 4 deletions extensions/src/platform-scripture/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"lint:styles": "stylelint **/*.{css,scss}",
"lint-fix": "npm run lint-fix:scripts && npm run lint:styles -- --fix",
"lint-fix:scripts": "npm run format && npm run lint:scripts",
"test": "jest --silent",
"test": "vitest",
"typecheck": "tsc -p ./tsconfig.json"
},
"browserslist": [],
Expand Down Expand Up @@ -61,15 +61,13 @@
"eslint-import-resolver-typescript": "^3.7.0",
"eslint-plugin-compat": "^4.2.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-no-null": "^1.0.2",
"eslint-plugin-no-type-assertion": "^1.3.0",
"eslint-plugin-promise": "^6.6.0",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^4.6.2",
"glob": "^10.4.5",
"jest": "^29.7.0",
"lucide-react": "^0.468.0",
"papi-dts": "file:../../../lib/papi-dts",
"platform-bible-react": "file:../../../lib/platform-bible-react",
Expand All @@ -86,7 +84,6 @@
"swc-loader": "^0.2.6",
"tailwindcss": "^3.4.16",
"tailwindcss-animate": "^1.0.7",
"ts-jest": "^29.2.5",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"tsconfig-paths-webpack-plugin": "^4.2.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// import { LanguageStrings, LocalizeKey, ScriptureReference, substring } from 'platform-bible-utils';
import { LanguageStrings, LocalizeKey, ScriptureReference } from 'platform-bible-utils';
import {
Button,
Expand Down
4 changes: 4 additions & 0 deletions extensions/src/quick-verse/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ module.exports = {
// https://github.com/electron-react-boilerplate/eslint-config-erb/blob/main/index.js
// airbnb rules are embedded in erb https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb
'erb',
// https://github.com/import-js/eslint-plugin-import?tab=readme-ov-file#typescript
'plugin:import/recommended',
'plugin:import/typescript',
// Make sure this is last so it gets the chance to override other configs.
// See https://github.com/prettier/eslint-config-prettier and https://github.com/prettier/eslint-plugin-prettier
'plugin:prettier/recommended',
Expand All @@ -18,6 +21,7 @@ module.exports = {

// Use `noImplicitReturns` instead. See https://typescript-eslint.io/rules/consistent-return/.
'consistent-return': 'off',
'import/default': 'off',
'import/extensions': 'off',
// A temporary hack related to IDE not resolving correct package.json
'import/no-extraneous-dependencies': 'off',
Expand Down
1 change: 0 additions & 1 deletion extensions/src/quick-verse/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
"eslint-import-resolver-typescript": "^3.7.0",
"eslint-plugin-compat": "^4.2.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-no-null": "^1.0.2",
"eslint-plugin-no-type-assertion": "^1.3.0",
Expand Down
43 changes: 0 additions & 43 deletions jest.config.ts

This file was deleted.

2 changes: 1 addition & 1 deletion lib/papi-dts/papi.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4975,7 +4975,7 @@ declare module 'node/services/execution-token.service' {
}
declare module 'extension-host/services/extension-storage.service' {
import { ExecutionToken } from 'node/models/execution-token.model';
import { Buffer } from 'buffer';
import { Buffer } from 'node:buffer';
/**
* This is only intended to be called by the extension service. This service cannot call into the
* extension service or it causes a circular dependency.
Expand Down
3 changes: 3 additions & 0 deletions lib/platform-bible-react/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ dist

# Doc files
docs

# HTML (excluded only in this file since formatting went haywire)
index.html
6 changes: 0 additions & 6 deletions lib/platform-bible-react/.prettierrc.js

This file was deleted.

1 change: 1 addition & 0 deletions lib/platform-bible-react/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"../../.prettierrc.js"
Loading

0 comments on commit 0f0bea8

Please sign in to comment.