diff --git a/packages/web/package.json b/packages/web/package.json index b6192c31b..ab9ecb6c4 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -9,23 +9,23 @@ "dist" ], "scripts": { - "start": "webpack-dev-server --config web.webpack.dev.js", - "watch": "webpack -w --config web.webpack.dev.js", - "clean": "rm -fr dist", - "prebuild": "yarn clean", "build": "webpack --config web.webpack.prod.js && yarn tsc", - "lint": "eslint src/javascripts", + "clean": "rm -fr dist", "format": "prettier --write src/javascripts", - "tsc": "tsc --project tsconfig.json", + "lint": "eslint src/javascripts", + "prebuild": "yarn clean", + "start": "webpack-dev-server --config web.webpack.dev.js", "test": "jest --config jest.config.js --coverage", - "upgrade:snjs": "ncu -u '@standardnotes/*'" + "tsc": "tsc --project tsconfig.json", + "upgrade:snjs": "ncu -u '@standardnotes/*'", + "watch": "webpack -w --config web.webpack.dev.js" }, "devDependencies": { "@babel/core": "*", "@babel/plugin-transform-react-jsx": "^7.17.3", "@babel/preset-env": "*", "@babel/preset-typescript": "^7.16.7", - "@types/jest": "^27.4.1", + "@types/jest": "^27.5.1", "@types/react": "^17.0.42", "@types/react-dom": "^18.0.5", "@types/wicg-file-system-access": "^2020.9.5", @@ -41,6 +41,7 @@ "html-webpack-plugin": "^5.5.0", "identity-obj-proxy": "^3.0.0", "jest": "^27.5.1", + "jest-environment-jsdom": "^27.5.1", "lint-staged": ">=12", "mini-css-extract-plugin": "^2.6.0", "node-sass": "*", diff --git a/packages/web/src/javascripts/Services/AlertService.ts b/packages/web/src/javascripts/Services/AlertService.ts index c36685164..8b06672b2 100644 --- a/packages/web/src/javascripts/Services/AlertService.ts +++ b/packages/web/src/javascripts/Services/AlertService.ts @@ -1,4 +1,5 @@ -import { AlertService, ButtonType, sanitizeHtmlString } from '@standardnotes/snjs' +import { AlertService, ButtonType } from '@standardnotes/services' +import { sanitizeHtmlString } from '@standardnotes/utils' import { SKAlert } from '@standardnotes/styles' /** @returns a promise resolving to true if the user confirmed, false if they canceled */ diff --git a/packages/web/tsconfig.json b/packages/web/tsconfig.json index bec6b8498..f61c886c0 100644 --- a/packages/web/tsconfig.json +++ b/packages/web/tsconfig.json @@ -16,7 +16,7 @@ "declarationDir": "dist/@types", "baseUrl": ".", "jsx": "react-jsx", - "typeRoots": ["./src/javascripts/Types/External", "../../node_modules/@types"], + "typeRoots": ["./src/javascripts/Types/External", "../../node_modules/@types", "node_modules/@types"], "paths": { "@/*": ["./src/javascripts/*"], "@Controllers/*": ["src/javascripts/Controllers/*"], diff --git a/yarn.lock b/yarn.lock index b21e08b12..ec534ecaf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7504,7 +7504,7 @@ __metadata: "@standardnotes/snjs": "workspace:*" "@standardnotes/styles": "workspace:*" "@standardnotes/toast": "workspace:*" - "@types/jest": ^27.4.1 + "@types/jest": ^27.5.1 "@types/react": ^17.0.42 "@types/react-dom": ^18.0.5 "@types/wicg-file-system-access": ^2020.9.5 @@ -7521,6 +7521,7 @@ __metadata: html-webpack-plugin: ^5.5.0 identity-obj-proxy: ^3.0.0 jest: ^27.5.1 + jest-environment-jsdom: ^27.5.1 lint-staged: ">=12" mini-css-extract-plugin: ^2.6.0 mobx: ^6.5.0 @@ -8386,7 +8387,7 @@ __metadata: languageName: node linkType: hard -"@types/jest@npm:^27.4.1": +"@types/jest@npm:^27.4.1, @types/jest@npm:^27.5.1": version: 27.5.2 resolution: "@types/jest@npm:27.5.2" dependencies: