feat: adds nest example - #188
Merged
Merged
Conversation
calvinbrewer
commented
Sep 16, 2025
Contributor
- Adds flox env for more consistent developer environments
- Add nestjs example
CDThomas
approved these changes
Sep 16, 2025
|
|
||
| ### Protect Singleton Implementation | ||
|
|
||
| The singleton pattern ensures efficient client management: |
Contributor
There was a problem hiding this comment.
I'm not familiar with Nest, but are singletons the best practice? Wondering if this is too opinionated for an example.
If I were to implement this in my own application, I'd probably get it working with the example code and then refactor to not use a singleton (mostly because of testing headaches that they cause).
|
|
||
| ### Testing with Reset | ||
|
|
||
| The singleton pattern includes a reset function for clean test isolation: |
Contributor
There was a problem hiding this comment.
I'm a bit skeptical of this. Does this function actually give test isolation? The state is still essentially global and each test needs to do cleanup and run sequentially to avoid state leakage. Wondering if plain old composition and passing in the Protect client would be more clear/simple.
- Add unsafeParameterDecoratorsEnabled for NestJS decorator support - Ignore nix store paths to prevent permission errors - Update commit command to use pnpm run code:fix instead of cargo commands - Clean up .cursorrules by removing duplicate content
- Fix non-null assertion in DynamoDB error handling - Replace 'any' types with proper types in NestJS interceptors - Fix non-null assertions in protect.module.ts using nullish coalescing - Improve test type safety with proper Jest typing - Add tabIndex to breadcrumb component for accessibility - Replace forEach with for...of loops for better performance
- Reorder imports alphabetically across all files - Group imports by type (external, internal, types) - Improve import consistency following biome formatting rules - Apply consistent code formatting across the entire codebase
tobyhede
added a commit
that referenced
this pull request
Aug 21, 2026
Six open Dependabot alerts, all reachable because the overrides written to close earlier ones had gone stale in two distinct ways. OVERTAKEN SELECTORS go quiet. `postcss@<8.5.10` stopped matching once the tree resolved 8.5.14, so the entry sat here looking like a fix while a vulnerable version installed underneath it (#167 GHSA-r28c-9q8g-f849 HIGH, path traversal reading arbitrary .map files via attacker-controlled sourceMappingURL; #176 its incomplete-fix follow-up). `js-yaml@<3.15.0` was overtaken by its own fix — the tree resolved exactly 3.15.0, so nothing matched and nothing lifted it to 3.15.1 (#189). EXACT PINS INSIDE A STILL-MATCHING RANGE are worse: they cannot self-heal and Dependabot cannot fix them. `js-yaml@>=4.0.0 <5` kept matching, so a pin written to FIX an advisory was holding the tree at 4.2.0 and blocking 4.3.1 (#155, #188 — quadratic-CPU DoS via merge-key chains, then `!!omap` duplicate-key detection). `fast-uri@<3.1.3` did the same at 3.1.3 while #158 needs 3.1.4 and #175 needs 3.1.5. Both shapes are now written into the comments, because the lesson is reusable: keep the ceiling AHEAD of the patched floor rather than at it. THE js-yaml CAUTION IS DISCHARGED, checked rather than assumed. The comment warned that a past bump broke changesets. @changesets/[email protected] declares `js-yaml: ^4.1.1`, which 4.3.1 satisfies; 4.2.0 and 4.3.1 have identical `dependencies` and `exports`, no `engines`, no `main`; 4.3.0 and 4.3.1 are security backports only, with no API removal on the 4.x line — the breaking churn (grouped constant exports, MERGE_KEY removal, mandatory identify) is all on 5.x, which the `<5` ceiling already excludes. Verified by resolving js-yaml from @changesets/parse's own path (4.3.1, not a nested copy) and running `changeset status`, which parsed all 14 changesets and produced the correct per-package bumps. No cooldown bypass was needed: every target is 13-19 days old against the 7-day minimumReleaseAge. The comment claiming "4.3.0 is still inside the cooldown" was 54 days stale. None of the four is a runtime dependency of any published package, so nothing ships them and this needs no changeset. Also corrects dependabot.yml's "the only Rust in the repo" — there are two cargo entries, and the /packages/eql one landed with the subtree.
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.