Skip to content

Commit

Permalink
fix: danger js check for codemods and no changesets (#3461)
Browse files Browse the repository at this point in the history
  • Loading branch information
SiTaggart committed Sep 1, 2023
1 parent f6320be commit 455172f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .changeset/late-forks-vanish.md
@@ -0,0 +1,6 @@
---
'@twilio-paste/codemods': patch
'@twilio-paste/core': patch
---

[Codemods] Include new ProgressBar Exports
11 changes: 9 additions & 2 deletions .danger/__tests__/utils.spec.ts
Expand Up @@ -233,14 +233,15 @@ describe('danger utils', () => {
).toEqual(['@twilio-paste/style-props', '@twilio-paste/alert-dialog']);
});

it('should return the design-tokens package with even though no src files are updated', () => {
it('should return the design-tokens and codemods package with even though no src files are updated', () => {
expect(
getUnpublishedPackageNames(
[
'package.json',
'packages/paste-style-props/src/index.ts',
'packages/paste-core/components/alert-dialog/stories/index.stories.tsx',
'packages/paste-design-tokens/tokens/themes/evergreen/global/background-color.yml',
'packages/paste-codemods/tools/.cache/mappings.json',
'yarn.lock',
'.changeset/pretty-cameras-burn.md',
],
Expand All @@ -263,9 +264,15 @@ describe('danger utils', () => {
private: false,
location: '/Users/simon/dev/twilio/design-systems/paste/packages/paste-design-tokens',
},
{
name: '@twilio-paste/codemods',
version: '3.1.0',
private: false,
location: '/Users/simon/dev/twilio/design-systems/paste/packages/paste-codemods',
},
]
)
).toEqual(['@twilio-paste/style-props', '@twilio-paste/design-tokens']);
).toEqual(['@twilio-paste/style-props', '@twilio-paste/design-tokens', '@twilio-paste/codemods']);
});
});

Expand Down
3 changes: 2 additions & 1 deletion .danger/utils.ts
Expand Up @@ -74,7 +74,8 @@ export const getUnpublishedPackageNames = (touchedFiles: string[], publicPackage
filePath.includes('/src/') ||
filePath.includes('/paste-design-tokens/tokens/') ||
filePath.includes('/paste-design-tokens/formatters/') ||
filePath.includes('/paste-design-tokens/types/')
filePath.includes('/paste-design-tokens/types/') ||
filePath.includes('/paste-codemods/')
) {
uniquePackages.add(packageName);
}
Expand Down

0 comments on commit 455172f

Please sign in to comment.