-
Notifications
You must be signed in to change notification settings - Fork 361
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 #10875 from linode/staging
Release v1.127.0 - staging → master
- Loading branch information
Showing
204 changed files
with
6,171 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
"devDependencies": { | ||
"husky": "^3.0.1", | ||
"npm-run-all": "^4.1.5", | ||
"patch-package": "^7.0.0", | ||
"postinstall": "^0.6.0", | ||
"typescript": "^5.4.5" | ||
}, | ||
|
@@ -19,7 +18,6 @@ | |
"cost-of-modules": "yarn global add cost-of-modules && cost-of-modules --less --no-install --include-dev", | ||
"install:all": "yarn install --frozen-lockfile", | ||
"upgrade:sdk": "yarn workspace @linode/api-v4 version --no-git-tag-version --no-commit-hooks && yarn workspace linode-manager upgrade @linode/api-v4", | ||
"postinstall": "echo \"Skipping Patching: yarn workspaces run postinstall && patch-package\"", | ||
"build:sdk": "yarn workspace @linode/api-v4 build", | ||
"build:validation": "yarn workspace @linode/validation build", | ||
"build": "yarn build:validation && yarn build:sdk && yarn workspace linode-manager build", | ||
|
@@ -49,6 +47,7 @@ | |
"docs": "bunx [email protected] dev docs" | ||
}, | ||
"resolutions": { | ||
"braces": "^3.0.3", | ||
"@babel/traverse": "^7.23.3", | ||
"minimist": "^1.2.3", | ||
"yargs-parser": "^21.1.1", | ||
|
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.