Skip to content
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

fix: update the method for importing the nunjucks filter dependency #1237

Merged
merged 10 commits into from
Jul 31, 2024
5 changes: 5 additions & 0 deletions .changeset/proud-brooms-accept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@asyncapi/generator": patch
---

Updated the method for importing the Nunjucks filter dependency
2 changes: 1 addition & 1 deletion apps/generator/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG ASYNCAPI_GENERATOR_VERSION=1.10.9

FROM node:14-alpine
FROM node:18-alpine

WORKDIR /app

Expand Down
2 changes: 1 addition & 1 deletion apps/generator/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ module.exports = {
moduleNameMapper: {
'^nimma/legacy$': '<rootDir>../../node_modules/nimma/dist/legacy/cjs/index.js',
'^nimma/(.*)': '<rootDir>../../node_modules/nimma/dist/cjs/$1',
'^nunjucks-filters$': path.resolve(__dirname, '../nunjucks-filters'),
'^@asyncapi/nunjucks-filters$': path.resolve(__dirname, '../nunjucks-filters'),
},
};
2 changes: 1 addition & 1 deletion apps/generator/lib/filtersRegistry.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const path = require('path');
const fs = require('fs');
const xfs = require('fs.extra');
const { isAsyncFunction } = require('./utils');
const nunjucksFilters = require('nunjucks-filters');
const nunjucksFilters = require('@asyncapi/nunjucks-filters');

/**
* Registers all template filters.
Expand Down
2 changes: 1 addition & 1 deletion apps/generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"source-map-support": "^0.5.19",
"ts-node": "^10.9.1",
"typescript": "^4.9.3",
"nunjucks-filters": "file:../nunjucks-filters"
"@asyncapi/nunjucks-filters": "*"
},
"devDependencies": {
"eslint": "^6.8.0",
Expand Down
2 changes: 1 addition & 1 deletion apps/generator/test/test-project/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"moduleNameMapper": {
"^nimma/legacy$": "<rootDir>/../../../../node_modules/nimma/dist/legacy/cjs/index.js",
"^nimma/(.*)": "<rootDir>/../../../../node_modules/nimma/dist/cjs/$1",
"^nunjucks-filters$": "<rootDir>/../../../nunjucks-filters"
"^@asyncapi/nunjucks-filters$": "<rootDir>/../../../nunjucks-filters"
}
}
}
Loading
Loading