From 455172f9edc0837dc778b6b7203151fb169a5766 Mon Sep 17 00:00:00 2001 From: Simon Taggart Date: Fri, 1 Sep 2023 16:00:59 -0700 Subject: [PATCH] fix: danger js check for codemods and no changesets (#3461) --- .changeset/late-forks-vanish.md | 6 ++++++ .danger/__tests__/utils.spec.ts | 11 +++++++++-- .danger/utils.ts | 3 ++- 3 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 .changeset/late-forks-vanish.md diff --git a/.changeset/late-forks-vanish.md b/.changeset/late-forks-vanish.md new file mode 100644 index 0000000000..a99e79680c --- /dev/null +++ b/.changeset/late-forks-vanish.md @@ -0,0 +1,6 @@ +--- +'@twilio-paste/codemods': patch +'@twilio-paste/core': patch +--- + +[Codemods] Include new ProgressBar Exports diff --git a/.danger/__tests__/utils.spec.ts b/.danger/__tests__/utils.spec.ts index e95347c5d6..d618b5c48f 100644 --- a/.danger/__tests__/utils.spec.ts +++ b/.danger/__tests__/utils.spec.ts @@ -233,7 +233,7 @@ 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( [ @@ -241,6 +241,7 @@ describe('danger utils', () => { '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', ], @@ -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']); }); }); diff --git a/.danger/utils.ts b/.danger/utils.ts index 37c8b193e7..56dda59874 100644 --- a/.danger/utils.ts +++ b/.danger/utils.ts @@ -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); }