-
Notifications
You must be signed in to change notification settings - Fork 368
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10854 from linode/release-v1.127.0
Release v1.127.0 - release → staging
- Loading branch information
Showing
204 changed files
with
6,165 additions
and
2,663 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ lib | |
# editor configuration | ||
.vscode | ||
.idea | ||
**/*.iml | ||
|
||
# misc | ||
.DS_Store | ||
|
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
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
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
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,27 @@ | ||
import { getReactDocgenTSFileGlobs } from './utils'; | ||
|
||
describe('getReactDocgenTSFileGlobs', () => { | ||
const typeScriptFileGlobs = getReactDocgenTSFileGlobs(); | ||
it('should return component and feature globs for storybook files', () => { | ||
expect( | ||
typeScriptFileGlobs.some( | ||
(file) => file === 'src/components/Button/**/*.{ts,tsx}' | ||
) | ||
).toBe(true); | ||
expect( | ||
typeScriptFileGlobs.some( | ||
(file) => file === 'src/components/Paper.{ts,tsx}' | ||
) | ||
).toBe(true); | ||
expect( | ||
typeScriptFileGlobs.some( | ||
(file) => file === 'src/features/TopMenu/**/*.{ts,tsx}' | ||
) | ||
).toBe(true); | ||
expect( | ||
typeScriptFileGlobs.some( | ||
(file) => file === 'src/features/Longview/**/*.{ts,tsx}' | ||
) | ||
).toBe(false); | ||
}); | ||
}); |
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,28 @@ | ||
import globby from 'globby'; | ||
|
||
const PATTERN = 'src/**/*.stories.tsx'; | ||
|
||
/** | ||
* Find all storybook files, then return the glob containing the parent component/feature. | ||
* To be used in main.ts to tell react-docgen-typescript which files to compile. | ||
* https://github.com/linode/manager/pull/10762 | ||
* | ||
* Example: src/components/Button/Button.stories.tsx -> src/components/Button/**\/*.{ts,tsx} | ||
*/ | ||
export const getReactDocgenTSFileGlobs = () => { | ||
const filesWithStories = globby.sync(PATTERN); | ||
const files: string[] = []; | ||
|
||
filesWithStories.forEach((file) => { | ||
const execArr = /(src\/(components|features)\/[a-zA-Z]*(.|\/))/.exec(file); | ||
if (execArr) { | ||
const isDirectory = execArr[3] === '/'; | ||
const fileBlob = `${execArr[0]}${isDirectory ? '**/*.' : ''}{ts,tsx}`; | ||
if (!files.includes(fileBlob)) { | ||
files.push(fileBlob); | ||
} | ||
} | ||
}); | ||
|
||
return files; | ||
}; |
Oops, something went wrong.