-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Merge in alpha branch. Replace node v14 with node v18 for github…
… actions tests (#191) * Trial run of alpha and beta release of npm package. Remove husky and lint-staged * node to 18 * remove husky prepare * add missing package * feat: Upgrade Mermaid dependency to v10.0.2 (#175) * feat: Upgrade Mermaid dependency to v9 * fix tests and remove search from from/to many to many count array * remove husky and lint staging tools * Testing alpha/beta package releases * feat: Option to specify mmdcPath (#188) * fix actions on alpha * fix branch names on alpha * chore(release): 1.4.0 * tag format change * remove ts files from package * remove ts files from package * fix: remove duplicate build step * fix: Revert removal of ts files from npm package * fix: Add back in prepublish script * chore(release): 1.4.1 * chore(release): 1.4.2 * fix: Improve labeling of nullable and primary keys in table * chore(release): 1.4.3 * fix: tarball and deployment setup for releaserc * chore(release): 1.4.4 * fix: Add type definitions to package. remove markdown files from package output. * chore(release): 1.4.5 * fix: Trim mmdc from mmdcPath. Added test and documentation for how to utilize new config ption. Resolve tests from nullable and primary key changes. * feat: Support unique names (#190) * chore: Upgrade semantic release and prettier * moving generator helper to dev dependencies * update ci jobs to drop node 14 and add 18
- Loading branch information
Showing
18 changed files
with
1,443 additions
and
777 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ node_modules/ | |
prisma/ | ||
.github/ | ||
.husky/ | ||
__tests__/ | ||
__tests__/ | ||
*.md |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import * as child_process from 'child_process'; | ||
|
||
test('setting mmdcPath works', async () => { | ||
const fileName = 'mmdcPath.svg'; | ||
const folderName = '__tests__'; | ||
child_process.execSync(`rm -f ${folderName}/${fileName}`); | ||
child_process.execSync(`prisma generate --schema ./prisma/mmdcPath.prisma`); | ||
const svgContent = child_process | ||
.execSync(`cat ${folderName}/${fileName}`) | ||
.toString(); | ||
// did the model get added | ||
expect(svgContent).toContain('users'); | ||
|
||
// User has id | ||
expect(svgContent).toMatch( | ||
/id="text-entity-users([^\><]*)-attr-1-name"([^<\>]*)\>id<\/text\>/ | ||
); | ||
}); |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import * as child_process from 'child_process'; | ||
|
||
test('Support unique names. Starting issue https://github.com/keonik/prisma-erd-generator/issues/127', async () => { | ||
const fileName = 'unique-names.svg'; | ||
const folderName = '__tests__'; | ||
child_process.execSync(`rm -f ${folderName}/${fileName}`); | ||
child_process.execSync( | ||
`prisma generate --schema ./prisma/unique-names.prisma` | ||
); | ||
const svgContent = child_process | ||
.execSync(`cat ${folderName}/${fileName}`) | ||
.toString(); | ||
// did the model get added | ||
expect(svgContent).toContain('[Production$My Table]'); | ||
|
||
// User has id | ||
expect(svgContent).toMatch( | ||
/id="text-entity-ProductionMyTable([^\><]*)-attr-1-name"([^<\>]*)\>id<\/text\>/ | ||
); | ||
}); |
Oops, something went wrong.