Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
bb019d5
docs: add agent guide, ADRs and modernization plan
kevindb Nov 11, 2026
5764f8b
test: add Vitest browser harness for the current source
kevindb Nov 11, 2026
835100e
test: characterize current behavior, recording known bugs as it.fails
kevindb Nov 11, 2026
df45f19
docs: record test findings and coverage baseline in the plan
kevindb Nov 11, 2026
80f2b55
docs: rename the trunk from master to main
kevindb Nov 11, 2026
21fc752
build: convert src to an ES module and build module and classic UMD w…
kevindb Nov 11, 2026
85a50cd
build: replace Grunt with ESLint and Prettier
kevindb Nov 11, 2026
e1f4a95
style: format with Prettier
kevindb Nov 11, 2026
f2ee8f6
chore: ignore the Prettier sweep in git blame
kevindb Nov 11, 2026
a83aec0
test: add published-file and end-to-end tests; align package metadata
kevindb Nov 11, 2026
511d01b
build: lint e2e page callbacks with browser globals
kevindb Nov 11, 2026
e878964
docs: record tooling progress and the jQuery 4 CommonJS finding
kevindb Nov 11, 2026
0f1f58b
build: run lint, format check, build and every test project in npm test
kevindb Nov 11, 2026
c467418
ci: add CI, CodeQL, release and Dependabot workflows
kevindb Nov 11, 2026
d60fe18
docs: add bug report form and security policy
kevindb Nov 11, 2026
b04ff04
docs: mark tooling and CI done in the plan
kevindb Nov 11, 2026
0928e21
docs: add the architecture review and a Stryker mutation run to the plan
kevindb Nov 11, 2026
175e6ec
docs: add GLOSSARY.md and record the architecture review decisions
kevindb Nov 11, 2026
cd7c5a9
test: cover the gaps a mutation run found in selects, radios, argumen…
kevindb Nov 11, 2026
0dd3f86
docs: record the mutation report and two new bugs in the plan
kevindb Nov 11, 2026
72dd7b8
refactor: move the loader's inner functions to module scope and pass …
kevindb Nov 12, 2026
94cdd6f
fix: add a select's options from the values loaded into it, not from …
kevindb Nov 12, 2026
fe33dd0
fix: append options when a key's value for a select is an array
kevindb Nov 12, 2026
e22bbb7
fix: select the values in an array loaded into a multiple select by key
kevindb Nov 12, 2026
be00bd1
fix: select a scalar value in a multiple select with one option
kevindb Nov 12, 2026
d96dcbb
fix: add a link's query parameter before its fragment
kevindb Nov 12, 2026
14ebd05
fix: append a link parameter with & when the href is only a query
kevindb Nov 12, 2026
1643e39
fix: set an image from its own string or object value, keeping the to…
kevindb Nov 12, 2026
83cbe1b
refactor: move setting values into an element-kind module with one fu…
kevindb Nov 12, 2026
f8f8d64
test: require 100% coverage now that the dead branches are gone
kevindb Nov 12, 2026
a4ce385
refactor: move the contains patch and jQuery Mobile refresh into a le…
kevindb Nov 12, 2026
124513c
feat: add $.fn.loadJSON.debug to warn once about each behavior remove…
kevindb Nov 12, 2026
883738b
refactor: compare checkbox values with a local loop instead of Array.…
kevindb Nov 12, 2026
665eecd
fix: define Array.prototype.contains as non-enumerable
kevindb Nov 12, 2026
2fc497f
refactor: move key matching into a key-match module with one query pe…
kevindb Nov 12, 2026
7e99aac
fix: match a key that is not a valid selector by comparing attributes
kevindb Nov 12, 2026
1d972fe
fix: load an array into an element that is not a select or form (#28)
Dec 14, 2017
4da85be
docs: add Francesco Angi to the contributors
kevindb Nov 12, 2026
10c3aaa
refactor: split the walk by value shape and let element kinds say whi…
kevindb Nov 12, 2026
21bf3aa
refactor: normalize the loadJSON argument once and load data through …
kevindb Nov 12, 2026
2dcb338
fix: parse a JSON string argument with JSON.parse so it loads on jQue…
kevindb Nov 12, 2026
824b278
feat: warn about the mobile option when debug is on
kevindb Nov 12, 2026
1d93d7b
fix: build jQuery 4 from jquery/factory when the classic build is req…
kevindb Nov 12, 2026
8be4a7b
chore: restore the default ESLint rules the refactors no longer trip
kevindb Nov 12, 2026
e1317a4
test: cover the gaps a second mutation run found in fields, links, ma…
kevindb Nov 12, 2026
cf76d99
refactor: narrow takesWhole to takesObject, the only shape the walk a…
kevindb Nov 12, 2026
940fe02
docs: record the Phase 4 fixes, refactors and final mutation score in…
kevindb Nov 12, 2026
409e487
build: write a copy of the classic build into docs/examples for GitHu…
kevindb Nov 12, 2026
60096f9
docs: add working examples on jQuery 4 under docs/examples (#32)
kevindb Nov 12, 2026
06cd398
docs: move the wiki guides into docs/ and describe 1.4 behavior
kevindb Nov 12, 2026
e2b0c1d
docs: document $.fn.loadJSON.debug and each deprecation notice
kevindb Nov 12, 2026
9aeb55f
docs: turn the README into a landing page and credit Jovan Popovic (#25)
kevindb Nov 12, 2026
11af17b
docs: update CONTRIBUTING for npm test, Node 26 and the jQuery matrix
kevindb Nov 12, 2026
1068ab0
docs: record the finished Phase 4 docs in the plan
kevindb Nov 12, 2026
57542f9
docs: format the examples with Prettier
kevindb Nov 12, 2026
5ce28b6
chore: delete the old examples and their vendored libraries
kevindb Nov 12, 2026
1fbc5d1
docs: note the deleted examples in the plan
kevindb Nov 12, 2026
840c9c5
chore: set the version to 1.4.0
kevindb Nov 13, 2026
273f3a5
docs: add SRI hashes to the 1.4.0 CDN snippets
kevindb Nov 13, 2026
8d06712
test: check the README's CDN snippets against the minified build's SR…
kevindb Nov 13, 2026
7bcb98f
test: record that a bundler reading the browser field never registers…
kevindb Nov 13, 2026
ccb54c4
fix: let bundlers use the module build instead of the classic build i…
kevindb Nov 13, 2026
673268f
docs: record the Phase 5 start and the browser field fix in the plan
kevindb Nov 13, 2026
083d9f1
docs: keep the internal plans, agent docs and ADRs off GitHub Pages
kevindb Nov 13, 2026
d83acd2
docs: record how 1.4 differs from npm 1.3.3 in the plan
kevindb Nov 13, 2026
f203684
docs: mark the Pages exclude and the 1.3.3 comparison done in the plan
kevindb Nov 13, 2026
11b5f1f
docs: record the npm environment and main protection in the plan
kevindb Nov 13, 2026
2aa1f19
docs: record the npm trusted publisher setup in the plan
kevindb Nov 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions .editorconfig

This file was deleted.

2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Prettier format sweep
e1f4a95992d0b10d470a209cccba69c28598a338
57 changes: 57 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Bug report
description: Something in jQuery loadJSON does not work as documented.
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Please search the [open issues](https://github.com/kevindb/jquery-load-json/issues) first, and see [Reporting a bug](https://github.com/kevindb/jquery-load-json/blob/main/CONTRIBUTING.md#reporting-a-bug).
Do not report security issues here; see the [security policy](https://github.com/kevindb/jquery-load-json/blob/main/SECURITY.md).
- type: textarea
id: description
attributes:
label: Description
description: What happened?
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected behavior
description: What did you expect to happen?
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps to reproduce
description: The HTML template, the data you pass to `loadJSON`, and any options.
render: html
validations:
required: true
- type: input
id: demo
attributes:
label: Demonstration
description: A link to a minimal example, for instance on [JSFiddle](https://jsfiddle.net/) or [CodePen](https://codepen.io/).
- type: input
id: plugin-version
attributes:
label: jQuery loadJSON version
placeholder: "1.4.0"
validations:
required: true
- type: input
id: jquery-version
attributes:
label: jQuery version
placeholder: "3.7.1"
validations:
required: true
- type: input
id: browsers
attributes:
label: Browsers and versions
placeholder: "Firefox 140, Safari 26"
validations:
required: true
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: Report a security vulnerability
url: https://github.com/kevindb/jquery-load-json/security/advisories/new
about: Please report security issues privately, as the security policy (SECURITY.md) describes, not in a public issue.
- name: Documentation
url: https://github.com/kevindb/jquery-load-json#readme
about: Usage, options and examples.
29 changes: 29 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
commit-message:
prefix: ci
groups:
github-actions:
patterns:
- "*"

# Version updates for the dev tooling only. The jQuery dev dependencies (jquery3, jquery4)
# are pinned on purpose: the test matrix runs those exact releases.
- package-ecosystem: npm
directory: /
schedule:
interval: weekly
allow:
- dependency-type: development
ignore:
- dependency-name: "jquery*"
commit-message:
prefix: build
include: scope
groups:
dev-dependencies:
dependency-type: development
17 changes: 0 additions & 17 deletions .github/issue_template.md

This file was deleted.

83 changes: 83 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: CI

on:
push:
branches: [main]
paths-ignore: ["docs/**", "**/*.md"]
# No paths-ignore on pull requests: a skipped workflow never reports its required checks.
pull_request:

concurrency:
group: ci-${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
# Lint, format check, build, coverage on Chromium, Firefox and WebKit with jQuery 3.7.1, and a check
# that the committed dist/ (and its copy for the examples) matches the build.
test:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- name: Get Playwright version
id: playwright
run: echo "version=$(node -p "require('playwright/package.json').version")" >> "$GITHUB_OUTPUT"
- name: Cache Playwright browsers
uses: actions/cache@v6
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ steps.playwright.outputs.version }}-all
- run: npx playwright install --with-deps chromium firefox webkit
- run: npm test
- name: Check committed dist and the examples' copy match the build
run: git diff --exit-code -- dist docs/examples/jquery.loadJSON.js

# The suite and the end-to-end tests against the jQuery support floor, the latest 3.x, and 4.x.
jquery:
name: jQuery ${{ matrix.jquery }} on ${{ matrix.browser }}
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
browser: [chromium, firefox, webkit]
jquery: ["1.7.2", "3.7.1", "4.0.0"]
include:
- { jquery: "1.7.2", file: ".jquery/jquery-1.7.2.js" }
- { jquery: "3.7.1", file: "node_modules/jquery3/dist/jquery.js" }
- { jquery: "4.0.0", file: "node_modules/jquery4/dist/jquery.js" }
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- name: Get Playwright version
id: playwright
run: echo "version=$(node -p "require('playwright/package.json').version")" >> "$GITHUB_OUTPUT"
- name: Cache Playwright browsers
uses: actions/cache@v6
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ steps.playwright.outputs.version }}-${{ matrix.browser }}
- run: npx playwright install --with-deps ${{ matrix.browser }}
- name: Fetch jQuery 1.7.2
if: matrix.jquery == '1.7.2'
run: scripts/fetch-jquery.sh 1.7.2
- name: Run the suite
run: npx vitest run --project suite-${{ matrix.browser }}
env:
JQUERY_FILE: ${{ matrix.file }}
- name: Run the end-to-end tests
run: npm run test:e2e -- --project ${{ matrix.browser }}
env:
JQUERY_FILE: ${{ matrix.file }}
62 changes: 0 additions & 62 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CodeQL

on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: "23 6 * * 1"

concurrency:
group: codeql-${{ github.head_ref || github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
analyze:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [javascript-typescript, actions]
steps:
- uses: actions/checkout@v7
- uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: none
queries: security-extended
# Scan the source once: every dist/ build repeats its alerts, and tests and docs are not shipped.
config: |
paths-ignore:
- dist
- test
- docs
- node_modules
- uses: github/codeql-action/analyze@v4
with:
category: /language:${{ matrix.language }}
Loading
Loading