From 4730cdab17854c831a7b556571ea1c3e3c7d3ad7 Mon Sep 17 00:00:00 2001 From: Junyao Chen Date: Mon, 12 Jun 2023 21:38:02 +0000 Subject: [PATCH] dependencies: Install `@types/jquery.validation for type annotation. `signup.js` uses `jquery-validation` plugin, which is a javascript package shipped without type definitions. Installing its corresponding types help with TypeScript migration by allowing types annotations involving the plugin methods and obejcts. --- package.json | 1 + pnpm-lock.yaml | 9 +++++++++ tsconfig.json | 2 +- version.py | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b56b4899d0..ce0841cd8d 100644 --- a/package.json +++ b/package.json @@ -94,6 +94,7 @@ "@types/blueimp-md5": "^2.18.0", "@types/clean-css": "^4.2.2", "@types/jquery": "^3.3.31", + "@types/jquery.validation": "^1.16.7", "@types/katex": "^0.16.0", "@types/lodash": "^4.14.172", "@types/micromodal": "^0.3.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 438134d4e2..c6ae01cc3e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -280,6 +280,9 @@ devDependencies: '@types/jquery': specifier: ^3.3.31 version: 3.5.16 + '@types/jquery.validation': + specifier: ^1.16.7 + version: 1.16.7 '@types/katex': specifier: ^0.16.0 version: 0.16.1 @@ -2915,6 +2918,12 @@ packages: '@types/istanbul-lib-report': 3.0.0 dev: false + /@types/jquery.validation@1.16.7: + resolution: {integrity: sha512-auRrFzVUOOg7jcLMGyEhvKAC84e8/Tu27wJXDLk3NZ0XCKGZWHYm7livBEjRs3LkB4vGnMKqWXBBnRpmCO9mhQ==} + dependencies: + '@types/jquery': 3.5.16 + dev: true + /@types/jquery@3.5.16: resolution: {integrity: sha512-bsI7y4ZgeMkmpG9OM710RRzDFp+w4P1RGiIt30C1mSBT+ExCleeh4HObwgArnDFELmRrOpXgSYN9VF1hj+f1lw==} dependencies: diff --git a/tsconfig.json b/tsconfig.json index 118d4e3864..07dd0a313c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,7 +4,7 @@ "paths": { "*": ["web/src/types/*"], }, - "types": [], + "types": ["@types/jquery.validation"], /* TypeScript 3.4 added the --incremental flag but its API is not * currently public so ts-loader cannot use it yet. diff --git a/version.py b/version.py index 70dd1e1492..0feada16ef 100644 --- a/version.py +++ b/version.py @@ -48,4 +48,4 @@ API_FEATURE_LEVEL = 202 # historical commits sharing the same major version, in which case a # minor version bump suffices. -PROVISION_VERSION = (246, 0) +PROVISION_VERSION = (246, 1)