Skip to content

Commit

Permalink
feat: deprecated props enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Apr 6, 2021
1 parent 919d86f commit e732f35
Show file tree
Hide file tree
Showing 17 changed files with 7,561 additions and 7,308 deletions.
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
"name": "jest instrument",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"cwd": "${workspaceFolder}/core/instrument",
"args": ["mdx-template"],
"args": ["esm-props-info-external"],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true,
Expand Down Expand Up @@ -168,7 +168,7 @@
"name": "jest webpack-compile",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"cwd": "${workspaceFolder}/core/webpack-compile",
"args": ["react-typescript"],
"args": ["draft"],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true,
Expand Down
5 changes: 5 additions & 0 deletions core/core/src/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ export interface PropType {
* name of the parent/inherited property
*/
parentName?: string;

/**
* if the property is deprecated, contains a string
*/
deprecated?: string;
}

/**
Expand Down
6 changes: 3 additions & 3 deletions core/instrument/src/misc/props-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ export const getComponentProps = async (
console.error(`Multiple propsloaders found for file ${filePath}`);
}
const propsLoaderName = loaders.length === 1 ? loaders[0] : undefined;

const version = '1.05';
const cached = new CachedFileResource<ComponentInfo>(
'props-info',
`${filePath}-${componentName}-${
`x${filePath}-${componentName}-${
propsLoaderName ? propsLoaderName.name : ''
}`,
}-${version}`,
filePath,
);

Expand Down
Loading

0 comments on commit e732f35

Please sign in to comment.