Skip to content

Commit

Permalink
fix: update the method for importing the nunjucks filter dependency (#…
Browse files Browse the repository at this point in the history
…1237)

Co-authored-by: Lukasz Gornicki <lpgornicki@gmail.com>
  • Loading branch information
ayushnau and derberg committed Jul 31, 2024
1 parent 828b03f commit 93fb8e8
Show file tree
Hide file tree
Showing 7 changed files with 1,485 additions and 3,996 deletions.
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

0 comments on commit 93fb8e8

Please sign in to comment.