Ship a patched copy of jquery.validate.unobtrusive.js in @abp/jquery-validation-unobtrusive - #26006
Merged
Merged
Conversation
…validation-unobtrusive
EngincanV
approved these changes
Aug 21, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses upstream stagnation of jquery-validation-unobtrusive by vendoring a patched copy into @abp/jquery-validation-unobtrusive, updating the served asset mapping while keeping the same served /libs/... path and contributor attribution.
Changes:
- Add a vendored
jquery.validate.unobtrusive.jspatched to avoid jQuery APIs removed/deprecated in jQuery 4 ($.parseJSON,$.isFunction,$.proxy). - Remove the
jquery-validation-unobtrusivenpm dependency from@abp/jquery-validation-unobtrusive. - Update ABP resource mapping to serve the vendored script from the package itself.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| npm/packs/jquery-validation-unobtrusive/src/jquery.validate.unobtrusive.js | Adds the vendored + patched unobtrusive validation script. |
| npm/packs/jquery-validation-unobtrusive/package.json | Drops the upstream jquery-validation-unobtrusive dependency. |
| npm/packs/jquery-validation-unobtrusive/abp.resourcemapping.js | Updates mapping to serve the vendored script path. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| /// of adapterName will be used instead.</param> | ||
| /// <returns type="jQuery.validator.unobtrusive.adapters" /> | ||
| return this.add(adapterName, [attribute || "val"], function (options) { | ||
| setValidationValues(options, ruleName || adapterName, options.params[attribute]); |
Comment on lines
12
to
14
| "dependencies": { | ||
| "@abp/jquery-validation": "~10.7.0-rc.3", | ||
| "jquery-validation-unobtrusive": "^4.0.0" | ||
| "@abp/jquery-validation": "~10.7.0-rc.3" | ||
| }, |
| * @license | ||
| * Unobtrusive validation support library for jQuery and jQuery Validate | ||
| * Copyright (c) .NET Foundation. All rights reserved. | ||
| * Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolve #25972
The upstream npm package (4.0.0, 2022) still calls
$.parseJSON/$.isFunction, which are removed in jQuery 4, and no new release is planned.@abp/jquery-validation-unobtrusivenow ships its own copy of the upstream source (JSON.parse,typeof,Function.prototype.bind) and drops the upstream dependency; the served path/libs/jquery-validation-unobtrusive/jquery.validate.unobtrusive.jsand the contributor stay the same.