Skip to content

Commit

Permalink
fix: add mermaid dependency to new projects (#570)
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonroberts authored Jul 25, 2023
1 parent 3313a7b commit 525c6c9
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/create-analog/template-angular-v15/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"@nrwl/angular": "^15.0.0",
"front-matter": "^4.0.2",
"marked": "^5.0.2",
"mermaid": "^10.2.4",
"prismjs": "^1.29.0",
"rxjs": "~7.5.6",
"tslib": "^2.4.0",
Expand Down
1 change: 1 addition & 0 deletions packages/create-analog/template-angular-v16/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"marked": "^5.0.2",
"marked-gfm-heading-id": "^3.0.4",
"marked-highlight": "^2.0.1",
"mermaid": "^10.2.4",
"prismjs": "^1.29.0",
"rxjs": "~7.5.6",
"tslib": "^2.4.0",
Expand Down
2 changes: 2 additions & 0 deletions packages/nx-plugin/src/generators/app/generator.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ describe('nx-plugin generator', () => {
);
expect(dependencies['front-matter']).toBe('^4.0.2');
expect(dependencies['marked']).toBe('^4.2.4');
expect(dependencies['mermaid']).toBe('^10.2.4');
expect(dependencies['prismjs']).toBe('^1.29.0');

expect(devDependencies['@nx/devkit']).toBe('~16.0.0');
Expand Down Expand Up @@ -68,6 +69,7 @@ describe('nx-plugin generator', () => {
expect(dependencies['marked']).toBe('^5.0.2');
expect(dependencies['marked-gfm-heading-id']).toBe('^3.0.4');
expect(dependencies['marked-highlight']).toBe('^2.0.1');
expect(dependencies['mermaid']).toBe('^10.2.4');
expect(dependencies['prismjs']).toBe('^1.29.0');

expect(devDependencies['@nx/devkit']).toBe('^16.4.0');
Expand Down
2 changes: 2 additions & 0 deletions packages/nx-plugin/src/generators/app/versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const V16_SUPERJSON = '^1.12.3';
export const V16_ANGULAR_PLATFORM_SERVER = '~16.0.0';
export const V16_FRONT_MATTER = '^4.0.2';
export const V16_MARKED = '^5.0.2';
export const V16_MERMAID = '^10.2.4';
export const V16_PRISMJS = '^1.29.0';

// devDependencies
Expand Down Expand Up @@ -42,6 +43,7 @@ export const V15_SUPERJSON = '^1.12.3';
export const V15_ANGULAR_PLATFORM_SERVER = '^15.0.0';
export const V15_FRONT_MATTER = '^4.0.2';
export const V15_MARKED = '^5.0.2';
export const V15_MERMAID = '^10.2.4';
export const V15_PRISMJS = '^1.29.0';

// devDependencies
Expand Down
11 changes: 10 additions & 1 deletion packages/nx-plugin/src/generators/app/versions/dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ import {
V16_X_MARKED,
V16_X_MARKED_GFM_HEADING_ID,
V16_X_MARKED_HIGHLIGHT,
V16_X_MERMAID,
V16_X_PRISMJS,
} from './nx_16_X/versions';
import {
V15_X_ANALOG_JS_CONTENT,
V15_X_ANALOG_JS_ROUTER,
V15_X_FRONT_MATTER,
V15_X_MARKED,
V15_X_MERMAID,
V15_X_PRISMJS,
} from './nx_15_X/versions';
import { stripIndents } from '@nx/devkit';
Expand All @@ -23,10 +25,15 @@ const dependencyKeys15 = [
'@angular/platform-server',
'front-matter',
'marked',
'mermaid',
'prismjs',
] as const;

const dependencyKeys16 = ['marked-gfm-heading-id', 'marked-highlight'] as const;
const dependencyKeys16 = [
'marked-gfm-heading-id',
'marked-highlight',
'mermaid',
] as const;

export type AnalogDependency15 = (typeof dependencyKeys15)[number];
export type AnalogDependency16 = (typeof dependencyKeys16)[number];
Expand Down Expand Up @@ -58,6 +65,7 @@ export const getAnalogDependencies = (
'@analogjs/router': V15_X_ANALOG_JS_ROUTER,
'front-matter': V15_X_FRONT_MATTER,
marked: V15_X_MARKED,
mermaid: V15_X_MERMAID,
prismjs: V15_X_PRISMJS,
};
}
Expand All @@ -71,6 +79,7 @@ export const getAnalogDependencies = (
marked: V16_X_MARKED,
'marked-gfm-heading-id': V16_X_MARKED_GFM_HEADING_ID,
'marked-highlight': V16_X_MARKED_HIGHLIGHT,
mermaid: V16_X_MERMAID,
prismjs: V16_X_PRISMJS,
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const V15_X_ISOMORPHIC_FETCH = '^3.0.0';
export const V15_X_SUPERJSON = '^1.12.3';
export const V15_X_FRONT_MATTER = '^4.0.2';
export const V15_X_MARKED = '^4.2.4';
export const V15_X_MERMAID = '^10.2.4';
export const V15_X_PRISMJS = '^1.29.0';

// devDependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const V16_X_FRONT_MATTER = '^4.0.2';
export const V16_X_MARKED = '^5.0.2';
export const V16_X_MARKED_GFM_HEADING_ID = '^3.0.4';
export const V16_X_MARKED_HIGHLIGHT = '^2.0.1';
export const V16_X_MERMAID = '^10.2.4';
export const V16_X_PRISMJS = '^1.29.0';

// devDependencies
Expand Down

0 comments on commit 525c6c9

Please sign in to comment.