Skip to content

Commit

Permalink
🤖 Merge PR #63968 [Nunjucks] Add dev argument to ConfigureOptions…
Browse files Browse the repository at this point in the history
… by @pezholio

There is an undocumented `dev` argument that can be sent to
`nunjucks.configure`, which allows a full error trace to the thrown

(See: mozilla/nunjucks#1430)
  • Loading branch information
pezholio committed Feb 15, 2023
1 parent 6d6ba4b commit 081d7f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions types/nunjucks/index.d.ts
Expand Up @@ -44,6 +44,7 @@ export interface ConfigureOptions {
lstripBlocks?: boolean | undefined;
watch?: boolean | undefined;
noCache?: boolean | undefined;
dev?: boolean | undefined;
web?:
| {
useCache?: boolean | undefined;
Expand Down
2 changes: 2 additions & 0 deletions types/nunjucks/nunjucks-tests.ts
Expand Up @@ -30,6 +30,7 @@ nunjucks.configure('views', {
autoescape: true,
watch: true,
});
nunjucks.configure({ dev: true });
rendered = env.renderString(src, ctx);

env.on('load', (name, source, loader) => {});
Expand All @@ -40,6 +41,7 @@ let extension: nunjucks.Extension = {
return 'The parser api is complicated';
},
};

env = env.addExtension('SpawnGlitter', extension);
const hasExtension: boolean = env.hasExtension('SpawnGlitter');
extension = env.getExtension('SpawnGlitter');
Expand Down

0 comments on commit 081d7f4

Please sign in to comment.