-
Notifications
You must be signed in to change notification settings - Fork 0
16 fix search overridden by href #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThis update transitions the project from Yarn and CircleCI to npm and GitHub Actions for dependency management and continuous integration. The Changes
Sequence Diagram(s)sequenceDiagram
participant Developer
participant GitHub
participant GitHub Actions
participant npm Registry
Developer->>GitHub: Push to main / PR to main
GitHub->>GitHub Actions: Trigger workflow (test-build or publish)
alt On PR to main
GitHub Actions->>GitHub: Checkout code
GitHub Actions->>GitHub Actions: Install dependencies (npm)
GitHub Actions->>GitHub Actions: Build project
GitHub Actions->>GitHub Actions: Run tests
else On push to main
GitHub Actions->>GitHub: Checkout code
GitHub Actions->>GitHub Actions: Check package versions
alt If version changed
GitHub Actions->>npm Registry: Publish updated package(s)
end
end
Poem
Tip ⚡💬 Agentic Chat (Pro Plan, General Availability)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (7)
💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (6)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (4)
.github/workflows/test-build.yaml (1)
1-15: Functional GitHub Actions workflow for CI, but could be improvedThe workflow correctly handles the basics of testing and building the project. However, consider these enhancements for better performance and reliability:
- Specify the Node.js version explicitly for consistency
- Add caching for node_modules to speed up subsequent runs
name: Test and Build on: pull_request: branches: - main jobs: test: name: Run all tests runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '18' + cache: 'npm' - run: npm install - run: npm run build - run: npm run testpackages/esroute-lit/package.json (1)
6-9: Standardize repository metadata.
The updates tolicense,author,repository, andhomepagelook accurate. For improved npm compatibility and clarity, consider switching therepositoryfield to an object format:- "repository": "github:sv2dev/esroute", + "repository": { + "type": "git", + "url": "git+https://github.com/sv2dev/esroute.git" + },And you may want to point
homepageto the repo root or README:- "homepage": "https://github.com/sv2dev/esroute/tree/main/packages/esroute-lit", + "homepage": "https://github.com/sv2dev/esroute#readme",This makes it clearer for users and tooling.
.github/workflows/publish.yaml (2)
15-18: Optional: Use full Git history for robust comparisons.
Currently,actions/checkoutis usingfetch-depth: 2(which covers onlyHEADandHEAD^). To avoid potential issues with shallow clones, consider:- - uses: actions/checkout@v4 - with: - fetch-depth: 2 + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # Fetch full history for accurate diffsThis provides greater reliability when checking version changes.
1-6: Nitpick: Add manual and scheduled triggers.
The workflow currently runs only on pushes tomain. You could enhance flexibility by supporting manual runs (workflow_dispatch) and a scheduled cron:on: push: branches: [ main ] workflow_dispatch: schedule: - cron: '0 0 1 * *' # monthlyThis allows ad-hoc and periodic publishes as needed.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (188)
.yarn/cache/@esbuild-darwin-arm64-npm-0.20.2-e287d70c91-8.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/@isaacs-cliui-npm-8.0.2-f4364666d5-4a473b9b32.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/@jest-schemas-npm-29.6.3-292730e442-910040425f.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/@jridgewell-sourcemap-codec-npm-1.4.15-a055fb62cf-b881c7e503.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/@lit-labs-ssr-dom-shim-npm-1.2.0-6bda8c35cb-704621c28d.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/@lit-reactive-element-npm-2.0.4-4836436301-368d788d9e.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/@npmcli-agent-npm-2.2.2-e2f559d6c0-67de7b88cc.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/@npmcli-fs-npm-3.1.0-0844a57978-a50a6818de.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/@pkgjs-parseargs-npm-0.11.0-cd2a3fe948-6ad6a00fc4.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/@rollup-rollup-darwin-arm64-npm-4.14.3-eca59280e9-8.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/@sinclair-typebox-npm-0.27.8-23e206d653-00bd7362a3.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/@types-estree-npm-1.0.5-5b7faed3b4-dd8b5bed28.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/@types-trusted-types-npm-2.0.7-a07fc44f59-8e4202766a.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/@vitest-expect-npm-1.5.0-aca2e6805c-a2a5659fbe.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/@vitest-runner-npm-1.5.0-4ea8130b80-3680a9d4f1.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/@vitest-snapshot-npm-1.5.0-807b642dba-fcf93d06c7.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/@vitest-spy-npm-1.5.0-7e371e530c-518c847bb1.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/@vitest-utils-npm-1.5.0-be84c568f7-07a59b62b4.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/abbrev-npm-2.0.0-0eb38a17e5-0e994ad2aa.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/acorn-npm-8.11.3-0d7ab48b38-76d8e7d559.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/acorn-walk-npm-8.3.2-df039a42bf-3626b9d26a.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/agent-base-npm-7.1.1-c9e1a4b59e-51c158769c.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/aggregate-error-npm-3.1.0-415a406f4e-1101a33f21.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/ansi-regex-npm-5.0.1-c963a48615-2aa4bb54ca.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/ansi-regex-npm-6.0.1-8d663a607d-1ff8b7667c.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/ansi-styles-npm-4.3.0-245c7d42c7-513b44c3b2.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/ansi-styles-npm-5.2.0-72fc7003e3-d7f4e97ce0.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/ansi-styles-npm-6.2.1-d43647018c-ef940f2f0c.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/assertion-error-npm-1.1.0-66b893015e-fd9429d3a3.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/balanced-match-npm-1.0.2-a53c126459-9706c088a2.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/brace-expansion-npm-2.0.1-17aa2616f9-a61e7cd2e8.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/cac-npm-6.7.14-c46284e425-45a2496a94.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/cacache-npm-18.0.2-d6329a1b9d-0250df80e1.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/chai-npm-4.4.1-ffd006b4b1-9ab84f36eb.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/check-error-npm-1.0.3-137994eabc-e2131025cf.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/chownr-npm-2.0.0-638f1c9c61-c57cf9dd07.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/clean-stack-npm-2.2.0-a8ce435a5c-2ac8cd2b2f.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/color-convert-npm-2.0.1-79730e935b-79e6bdb9fd.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/color-name-npm-1.1.4-025792b0ea-b044585952.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/cross-spawn-npm-7.0.3-e4ff3e65b3-671cc7c728.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/css.escape-npm-1.5.1-b24d2ba77a-f6d38088d8.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/debug-npm-4.3.4-4513954577-3dbad3f94e.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/deep-eql-npm-4.1.3-020a64f862-7f6d30cb41.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/diff-sequences-npm-29.6.3-18ab2c9949-f4914158e1.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/eastasianwidth-npm-0.2.0-c37eb16bd1-7d00d7cd8e.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/emoji-regex-npm-8.0.0-213764015c-d4c5c39d5a.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/emoji-regex-npm-9.2.2-e6fac8d058-8487182da7.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/encoding-npm-0.1.13-82a1837d30-bb98632f8f.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/env-paths-npm-2.2.1-7c7577428c-65b5df55a8.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/err-code-npm-2.0.3-082e0ff9a7-8b7b1be20d.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/esbuild-npm-0.20.2-1923187a7f-bc88050fc1.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/estree-walker-npm-3.0.3-0372979673-a65728d572.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/execa-npm-8.0.1-0211bd404c-cac1bf8658.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/exponential-backoff-npm-3.1.1-04df458b30-3d21519a4f.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/foreground-child-npm-3.1.1-77e78ed774-139d270bc8.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/fs-minipass-npm-2.1.0-501ef87306-1b8d128dae.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/fs-minipass-npm-3.0.3-d148d6ac19-8722a41109.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/fsevents-npm-2.3.3-ce9fb0ffae-11e6ea6fea.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/fsevents-patch-7934e3c202-8.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/get-func-name-npm-2.0.2-409dbe3703-3f62f4c236.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/get-stream-npm-8.0.1-c921b4840e-01e3d3cf29.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/glob-npm-10.3.12-f2e90133a0-2b0949d636.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/graceful-fs-npm-4.2.11-24bb648a68-ac85f94da9.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/happy-dom-npm-8.9.0-da8dfa876b-2a9d853199.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/he-npm-1.2.0-3b73a2ff07-3d4d6babcc.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/http-cache-semantics-npm-4.1.1-1120131375-83ac0bc60b.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/http-proxy-agent-npm-7.0.2-643ed7cc33-670858c8f8.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/https-proxy-agent-npm-7.0.4-a51e13f5dc-daaab857a9.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/human-signals-npm-5.0.0-ed25a9f58c-6504560d5e.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/iconv-lite-npm-0.6.3-24b8aae27e-3f60d47a5c.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/imurmurhash-npm-0.1.4-610c5068a0-7cae75c8cd.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/indent-string-npm-4.0.0-7b717435b2-824cfb9929.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/ip-address-npm-9.0.5-9fa024d42a-aa15f12cfd.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/is-fullwidth-code-point-npm-3.0.0-1ecf4ebee5-44a30c2945.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/is-lambda-npm-1.0.1-7ab55bc8a8-93a32f0194.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/is-stream-npm-3.0.0-a77ac9a62e-172093fe99.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/isexe-npm-2.0.0-b58870bd2e-26bf6c5480.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/isexe-npm-3.1.1-9c0061eead-7fe1931ee4.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/jackspeak-npm-2.3.6-42e1233172-57d43ad11e.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/js-tokens-npm-9.0.0-35a2868eaf-427d0db681.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/jsbn-npm-1.1.0-1da0181838-944f924f2b.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/jsonc-parser-npm-3.2.1-776f636a18-656d9027b9.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/lit-element-npm-4.0.5-4f984c8a4f-c6dac74ea4.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/lit-html-npm-3.1.3-f1b10aa915-b079d78586.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/lit-npm-3.1.3-fa38fcf7cd-17b33c2e6a.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/local-pkg-npm-0.5.0-c126c7ec8b-b0a6931e58.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/loupe-npm-2.3.7-f294c2ef33-96c058ec71.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/lru-cache-npm-10.2.0-b9f6b44740-eee7ddda4a.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/lru-cache-npm-6.0.0-b4c8668fe1-f97f499f89.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/magic-string-npm-0.30.9-0b1be34daa-a97b9a706b.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/make-fetch-happen-npm-13.0.0-f87a92bb87-7c7a6d381c.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/merge-stream-npm-2.0.0-2ac83efea5-6fa4dcc8d8.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/mimic-fn-npm-4.0.0-feaeda79f7-995dcece15.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/minimatch-npm-9.0.4-7be5a33efc-cf717f597e.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/minipass-collect-npm-2.0.1-73d3907e40-b251bceea6.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/minipass-fetch-npm-3.0.4-200ac7c66d-af7aad15d5.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/minipass-flush-npm-1.0.5-efe79d9826-56269a0b22.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/minipass-npm-3.3.6-b8d93a945b-a30d083c80.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/minipass-npm-5.0.0-c64fb63c92-425dab2887.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/minipass-npm-7.0.4-eacb4e042e-87585e258b.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/minipass-pipeline-npm-1.2.4-5924cb077f-b14240dac0.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/minipass-sized-npm-1.0.3-306d86f432-79076749fc.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/minizlib-npm-2.1.2-ea89cd0cfb-f1fdeac0b0.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/mkdirp-npm-1.0.4-37f6ef56b9-a96865108c.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/mlly-npm-1.6.1-947df259c8-c40a547dba.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/ms-npm-2.1.2-ec0c1512ff-673cdb2c31.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/nanoid-npm-3.3.7-98824ba130-d36c427e53.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/negotiator-npm-0.6.3-9d50e36171-b8ffeb1e26.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/node-fetch-npm-2.7.0-587d57004e-d76d2f5edb.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/node-gyp-npm-10.1.0-bdea7d2ece-72e2ab4b23.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/nopt-npm-7.2.0-dd734b678d-a9c0f57fb8.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/npm-run-path-npm-5.3.0-193efca236-ae8e7a89da.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/onetime-npm-6.0.0-4f3684e29a-0846ce78e4.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/p-limit-npm-5.0.0-cc102b17d7-87bf5837de.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/p-map-npm-4.0.0-4677ae07c7-cb0ab21ec0.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/path-key-npm-3.1.1-0e66ea8321-55cd7a9dd4.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/path-key-npm-4.0.0-2bce99f089-8e6c314ae6.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/path-scurry-npm-1.10.2-676482c764-6739b4290f.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/pathe-npm-1.1.2-b80d94db55-ec5f778d97.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/pathval-npm-1.1.1-ce0311d7e0-090e314771.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/picocolors-npm-1.0.0-d81e0b1927-a2e8092dd8.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/pkg-types-npm-1.0.3-dce22a705c-4b305c834b.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/postcss-npm-8.4.38-495621b279-649f9e60a7.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/pretty-format-npm-29.7.0-7d330b2ea2-032c160238.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/proc-log-npm-3.0.0-a8c21c2f0f-02b64e1b39.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/promise-retry-npm-2.0.1-871f0b01b7-f96a3f6d90.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/react-is-npm-18.2.0-0cc5edb910-e72d0ba81b.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/regenerator-runtime-npm-0.14.1-a6c97c609a-9f57c93277.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/retry-npm-0.12.0-72ac7fb4cc-623bd7d2e5.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/rollup-npm-4.14.3-28fe395e65-f5077037e8.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/safer-buffer-npm-2.1.2-8d5c0b705e-cab8f25ae6.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/semver-npm-7.6.0-f4630729f6-7427f05b70.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/shebang-command-npm-2.0.0-eb2b01921d-6b52fe8727.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/shebang-regex-npm-3.0.0-899a0cd65e-1a2bcae50d.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/siginfo-npm-2.0.0-9bbac931f8-8aa5a98640.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/signal-exit-npm-4.1.0-61fb957687-64c757b498.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/smart-buffer-npm-4.2.0-5ac3f668bb-b5167a7142.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/socks-npm-2.8.3-3532b59899-7a6b7f6eed.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/socks-proxy-agent-npm-8.0.3-30471cff1b-8fab38821c.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/source-map-js-npm-1.2.0-6e63f357e5-791a43306d.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/sprintf-js-npm-1.1.3-b99efd75b2-a3fdac7b49.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/ssri-npm-10.0.5-1a7557d04d-0a31b65f21.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/stackback-npm-0.0.2-73273dc92e-2d4dc4e64e.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/std-env-npm-3.7.0-5261c3c3c3-4f489d13ff.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/string-width-npm-4.2.3-2c27177bae-e52c10dc3f.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/string-width-npm-5.1.2-bf60531341-7369deaa29.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/strip-ansi-npm-6.0.1-caddc7cb40-f3cd25890a.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/strip-ansi-npm-7.1.0-7453b80b79-859c73fcf2.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/strip-final-newline-npm-3.0.0-7972cbec8b-23ee263adf.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/strip-literal-npm-2.1.0-3503c34c5f-37c2072634.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/tar-npm-6.2.1-237800bb20-f1322768c9.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/tinybench-npm-2.7.0-5fed377a2b-3a5061fa71.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/tinypool-npm-0.8.4-043dfecb16-d40c40e062.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/tinyspy-npm-2.2.1-1079b8de54-170d6232e8.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/tr46-npm-0.0.3-de53018915-726321c5ea.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/type-detect-npm-4.0.8-8d8127b901-62b5628bff.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/typescript-npm-5.4.5-8568a42232-53c879c6fa.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/typescript-patch-1ee941d5bd-2373c693f3.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/ufo-npm-1.5.3-8c9d710312-2f54fa543b.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/unique-filename-npm-3.0.0-77d68e0a45-8e2f59b356.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/unique-slug-npm-4.0.0-e6b08f28aa-0884b58365.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/vite-node-npm-1.5.0-231bd83051-7313d1f616.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/vite-npm-5.2.9-69707cedc5-7a97f9547a.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/vitest-npm-1.5.0-9d3c1fee8a-566d81639e.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/webidl-conversions-npm-3.0.1-60310f6a2b-c92a0a6ab9.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/webidl-conversions-npm-7.0.0-e8c8e30c68-f05588567a.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/whatwg-encoding-npm-2.0.0-d7451f51b4-7087810c41.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/whatwg-mimetype-npm-3.0.0-5b617710c1-ce08bbb36b.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/whatwg-url-npm-5.0.0-374fb45e60-b8daed4ad3.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/which-npm-2.0.2-320ddf72f7-1a5c563d3c.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/which-npm-4.0.0-dd31cd4928-f17e84c042.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/why-is-node-running-npm-2.2.2-881f898bf3-50820428f6.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/wrap-ansi-npm-7.0.0-ad6e1a0554-a790b846fd.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/wrap-ansi-npm-8.1.0-26a4e6ae28-371733296d.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/yallist-npm-4.0.0-b493d9e907-343617202a.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/cache/yocto-queue-npm-1.0.0-7b502f1987-2cac84540f.zipis excluded by!**/.yarn/**,!**/*.zip.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjsis excluded by!**/.yarn/**.yarn/releases/yarn-3.2.0.cjsis excluded by!**/.yarn/**.yarn/sdks/integrations.ymlis excluded by!**/.yarn/**.yarn/sdks/typescript/bin/tscis excluded by!**/.yarn/**.yarn/sdks/typescript/bin/tsserveris excluded by!**/.yarn/**.yarn/sdks/typescript/lib/tsc.jsis excluded by!**/.yarn/**.yarn/sdks/typescript/lib/tsserver.jsis excluded by!**/.yarn/**.yarn/sdks/typescript/lib/tsserverlibrary.jsis excluded by!**/.yarn/**.yarn/sdks/typescript/lib/typescript.jsis excluded by!**/.yarn/**.yarn/sdks/typescript/package.jsonis excluded by!**/.yarn/**package-lock.jsonis excluded by!**/package-lock.jsonyarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (18)
.circleci/config.yml(0 hunks).github/workflows/publish.yaml(1 hunks).github/workflows/test-build.yaml(1 hunks).gitignore(1 hunks).yarnrc.yml(0 hunks)package.json(1 hunks)packages/esroute-lit/.npmignore(1 hunks)packages/esroute-lit/package.json(1 hunks)packages/esroute-lit/tsconfig-check.json(0 hunks)packages/esroute-lit/tsconfig.json(1 hunks)packages/esroute/.npmignore(1 hunks)packages/esroute/package.json(1 hunks)packages/esroute/src/nav-opts.ts(1 hunks)packages/esroute/src/router.spec.ts(5 hunks)packages/esroute/src/router.ts(1 hunks)packages/esroute/tsconfig-check.json(0 hunks)packages/esroute/tsconfig.json(1 hunks)tsconfig.json(1 hunks)
💤 Files with no reviewable changes (4)
- packages/esroute-lit/tsconfig-check.json
- .yarnrc.yml
- packages/esroute/tsconfig-check.json
- .circleci/config.yml
🧰 Additional context used
🧬 Code Graph Analysis (2)
packages/esroute/src/router.spec.ts (1)
packages/esroute/src/route-resolver.ts (1)
resolve(19-44)
packages/esroute/src/router.ts (1)
packages/esroute/src/nav-opts.ts (1)
href(68-75)
🔇 Additional comments (24)
.gitignore (1)
5-5: Good addition for TypeScript incremental buildsAdding
*.tsbuildinfoto the ignore list is appropriate when using TypeScript with incremental compilation. These files contain cache information to speed up subsequent builds and shouldn't be committed to version control.package.json (4)
4-6: Good metadata additionsAdding the
private,license, andauthorfields improves the package metadata and follows npm best practices.
8-10: Successfully migrated from Yarn to npm workspace commandsThe script commands have been properly updated from Yarn workspace syntax to npm workspace syntax.
13-17: Updated test dependenciesThe dependency updates look good, including the addition of coverage support and version upgrades.
22-24: Added Volta configurationUsing Volta for Node.js version management is a good practice to ensure consistent development environments across the team.
Note: Node.js 22.14.0 is very recent. Make sure all team members can use this version.
packages/esroute-lit/.npmignore (1)
3-5: Improved npm package optimizationGood additions to exclude unnecessary files from the published npm package:
- Source maps aren't needed in production and increase package size
- Test files shouldn't be included in the published package
- TypeScript build info files are only needed for development
These changes will result in a cleaner, more optimized package for consumers.
packages/esroute/.npmignore (1)
3-6: Improved npm package optimizationGood additions to exclude unnecessary files from the published npm package:
- Source maps aren't needed in production
- Test files shouldn't be included in the published package
- The demo directory is for development purposes only
- TypeScript build info files are only needed for development
These changes will result in a cleaner, more optimized package for consumers.
packages/esroute/src/nav-opts.ts (1)
60-64: Improved handling of nullish values in NavOpts constructorThe changes from
!== undefinedto!= nullmean these properties will only be assigned when their values are neithernullnorundefined, which aligns with the router's updated state handling mentioned in the summary.This change makes the behavior more consistent across the codebase, but note that it's a subtle change that affects how the library treats
nullnavigation options.packages/esroute/tsconfig.json (1)
4-9: Improved TypeScript configuration for better project structureThe changes to the TypeScript configuration are well-structured and follow best practices:
- The
composite: trueflag enables project references for improved incremental builds- Setting
rootDirexplicitly ensures proper output structure- Using
include/excludepatterns instead of explicitly listing files improves maintainabilityThese changes align with modern TypeScript project organization and will make the build process more efficient.
packages/esroute/package.json (4)
3-3: Version bump appropriate for the implemented changesThe minor version increase (0.9.1 to 0.10.0) correctly reflects the behavior changes in how nullish values are handled in the Nav class.
7-10: Added proper package metadataThe added license, author, repository, and homepage fields follow npm package standards and improve package documentation.
11-14: Simplified build processThe build scripts have been streamlined to use TypeScript's built-in build command (
tsc -b), which aligns with the composite project configuration.This simplification makes the build process more maintainable and leverages TypeScript's incremental compilation features.
19-21: Reduced development dependenciesRemoving unnecessary dependencies like
esbuildandvitewhile keeping only TypeScript aligns with the simplified build approach. This makes the package lighter and easier to maintain.tsconfig.json (1)
3-11: TypeScript configuration modernized for better compatibility and development experience.The changes to the TypeScript configuration align with modern best practices:
- Switching to "bundler" for moduleResolution is appropriate for ESM-based projects
- Adding "moduleDetection": "force" ensures consistent module behavior for all .ts files
- Including source maps and declaration maps improves debugging capabilities
- The configuration is more streamlined by removing unnecessary options
These changes appear to be part of the broader migration from Yarn to npm mentioned in the PR summary.
packages/esroute/src/router.ts (1)
184-185: Bug fix: Ensuring consistent History API behavior by normalizing undefined states to null.This change fixes the issue mentioned in the PR title "fix search overridden by href" by ensuring that
nullis always passed to the History API whenstateis undefined. This is important because:
- The Web History API spec expects the state parameter to be serializable
- Some browsers treat
undefineddifferently thannullwhen passed to the History API- This ensures consistent cross-browser behavior
Previously, if state was undefined, it would be directly passed to
history.pushState/replaceState, which could cause inconsistent behavior across browsers.packages/esroute-lit/tsconfig.json (2)
4-6: Improved TypeScript project configuration for better build performance.The addition of
"composite": trueenables incremental builds, which can significantly improve compilation speed for large projects. Setting an explicitrootDiralso provides clearer project structure.
8-10: Enhanced TypeScript project structure with proper references and file management.This configuration:
- Uses
include/excludepatterns instead of listing individual files- Properly excludes test files from production builds
- Establishes a proper build dependency on the esroute package through project references
This approach is more maintainable and aligns with TypeScript best practices for monorepo setups.
packages/esroute/src/router.spec.ts (4)
3-3: Minor import order change without functional impact.The import order was changed but doesn't affect functionality.
27-27: Improved timer mechanism for asynchronous test flow.Replacing
new Promise(setImmediate)withsetTimeoutimproves cross-environment compatibility, assetImmediateis not available in all JavaScript environments.Also applies to: 46-46
59-59: Test assertions updated to match implementation changes.These assertions have been updated to expect
nullinstead ofundefinedfor the state parameter, aligning with the fix in the router implementation that passesstate ?? nullto the History API.Also applies to: 65-65, 71-71, 81-83
86-91: New test case for mapping function behavior.This new test verifies that when using a mapping function for navigation targets, the router properly:
- Replaces the state by default (using
history.replaceState)- Passes
nullas the state parameter- Preserves the path while updating the search parameters
This is an important test case that ensures the router behaves correctly when modifying only parts of the current navigation state.
packages/esroute-lit/package.json (3)
3-3: Bump package version to match release cycle.
Version has been updated to0.10.0. Ensure that CI workflows and other dependent packages are in sync with this new version.
11-13: Streamline build and publish scripts.
Replacing the multi-step build process withtsc -band adding aprepublishOnlyscript is a solid simplification that leverages TypeScript project references correctly.
23-23: Update dependency version.
Bumping"esroute": "^0.10.0"aligns with the package version. Confirm there are no breaking changes inesroute@0.10.0that affect this package.
Resolves Fix search overridden by href #16
10a551d to
97c7bdd
Compare
Summary by CodeRabbit