Extract React Types Versions Save

One stop shop for documenting your react components.

[email protected]

2 years ago

Minor Changes

  • a763063 #199 Thanks @madou! - Props that have comments which start with eslint-ignore or @ts- are no longer rendered, other surrounding comments are still rendered for the prop however.

  • a763063 #199 Thanks @madou! - Props that have comments which contain @internal or @access private are no longer rendered to the props table, essentially having the prop and all of its comments hidden.

[email protected]

2 years ago

Major Changes

  • 1ec5f76 #196 Thanks @marionebl! - Remove Atlaskit specific process.env switches (#195)

    BREAKING CHANGE This removes the previously available process.env switches to conditionally disable the loader. To restore the previous behaviour you'll have to use the resolveLoader webpack config, e.g.

    // webpack.config.js
    const enabled =
      ['production', 'staging'].includes(process.env.WEBSITE_ENV) ||
      process.env.FORCE_EXTRACT_REACT_TYPES;
    
    module.exports = {
      /* ... */
      resolveLoader: {
        alias: {
          'extract-react-types-loader': enabled
            ? undefined
            : require.resolve('./noop-extract-react-types-loader')
        }
      }
    };
    
    // noop-extract-react-types-loader.js
    module.exports = function noopExtractReactPropTypesLoader() {
      return `module.exports = {
        component: {
          kind: 'object',
          members: [
            {
              kind: 'property',
              key: { kind: 'id', name: 'Warning' },
              value: { kind: 'any' },
              optional: false,
              leadingComments: [
                {
                  type: 'commentBlock',
                  value: `extract-react-types is not being run in dev mode for speed reasons. If you need to
      see prop types add the environment variable \`FORCE_EXTRACT_REACT_TYPES\`
                  raw: '**'
                }
              ],
              default: {
                kind: 'string',
                value: 'Prop types are not shown in dev mode'
              }
            }
          ],
          referenceIdName: 'NoopPropTpes'
        }
      };`
    }
    

[email protected]

3 years ago

Patch Changes

[email protected]

3 years ago

Patch Changes

[email protected]

3 years ago

Minor Changes

[email protected]

3 years ago

Minor Changes

[email protected]

3 years ago

Patch Changes

[email protected]

3 years ago

Patch Changes

[email protected]

3 years ago

Patch Changes

  • 4589e9f #169 Thanks @danieldelcore! - Fixes a bug where variable names clash with type properties of the same name, causing a "Missing converter for: [path]" error

  • ff72fd8 #171 Thanks @danieldelcore! - Internal refactor. Changes internal logic and file structure only.

[email protected]

3 years ago

Patch Changes