Repository navigation
fix(generate): drop the generation timestamp from guard templates - #152
Closed
devinpadron1 wants to merge 1 commit into
Closed
devinpadron1 wants to merge 1 commit into
devinpadron1 wants to merge 1 commit into
Conversation
auth.guard.ts and guards.module.ts rendered "Generated at: <now>", so apso generate rewrote both files on every run of an auth-enabled project, even with no schema change. Remove the line from both templates, finishing 39679b1, which dropped the same timestamp from the shared header for regen churn and PII. Stop supplying generatedAt / generatedBy too: withGeneratedMeta (added them to every render) is deleted, and generateGuards no longer sets its own copy. No other template read either field. New test generates the guards twice and expects identical output. fixes apsoai#129
Contributor
|
Thanks @devinpadron1, your diagnosis and fix were right. Main had moved since you opened this (two new guard templates in 0.45 print the same line), so I carried your commit onto current main in #171 with you as the author, and added a commit for the new templates with you as co-author. Closing this in favor of #171. |
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.
auth.guard.tsandguards.module.tsrenderedGenerated at: <now>, soapso generaterewrote both files on every run of an auth-enabled project, even with no schema change.The line is removed from both templates. The timestamp was set in two places, so both are gone:
withGeneratedMeta(deleted; no template read its fields) andgenerateGuards's own copy.New test generates the guards twice and expects identical output; 390 tests pass, lint 0 errors.
Fixes #129