Skip to content

feat: adds nest example - #188

Merged
calvinbrewer merged 8 commits into
mainfrom
nest
Sep 17, 2025
Merged

feat: adds nest example#188
calvinbrewer merged 8 commits into
mainfrom
nest

Conversation

@calvinbrewer

Copy link
Copy Markdown
Contributor
  1. Adds flox env for more consistent developer environments
  2. Add nestjs example

@CDThomas CDThomas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some questions about the singleton pattern, but LGTM otherwise.

Comment thread examples/nest/README.md Outdated

### Protect Singleton Implementation

The singleton pattern ensures efficient client management:

@CDThomas CDThomas Sep 16, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Comment thread examples/nest/README.md Outdated

### Testing with Reset

The singleton pattern includes a reset function for clean test isolation:

@CDThomas CDThomas Sep 16, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@calvinbrewer
calvinbrewer merged commit 87a4918 into main Sep 17, 2025
1 check passed
@calvinbrewer
calvinbrewer deleted the nest branch September 17, 2025 23:12
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants