Skip to content

Commit

Permalink
Version Packages (#197)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and github-actions[bot] authored Jun 9, 2021
1 parent 1ec5f76 commit 47978d9
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 56 deletions.
55 changes: 0 additions & 55 deletions .changeset/seven-rats-taste.md

This file was deleted.

60 changes: 60 additions & 0 deletions packages/extract-react-types-loader/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,65 @@
# extract-react-types-loader

## 1.0.0

### Major Changes

- [`1ec5f76`](https://github.com/atlassian/extract-react-types/commit/1ec5f76c5e99ce78e952a83eac178fcc22e5f557) [#196](https://github.com/atlassian/extract-react-types/pull/196) Thanks [@marionebl](https://github.com/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.

```js
// 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')
}
}
};
```

```js
// 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'
}
};`
}
```

## 0.3.17

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/extract-react-types-loader/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "extract-react-types-loader",
"version": "0.3.17",
"version": "1.0.0",
"main": "index.js",
"repository": "atlassian/extract-react-types",
"description": "Load extract-react-types data given a fiile path, using webpack",
Expand Down

0 comments on commit 47978d9

Please sign in to comment.