Skip to content

Commit b89a989

Browse files
authored
Noviny/config updates (#52)
* update configs to align them all before publish * modify changeset config
1 parent 277b0be commit b89a989

File tree

13 files changed

+110
-28
lines changed

13 files changed

+110
-28
lines changed

.changeset/config.js

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ If a config option isn't present here, we will fall back to the defaults.
1212

1313
const changesetOptions = {
1414
// If true, we will automatically commit the changeset when the command is run
15-
commit: false,
15+
commit: false
1616
};
1717

1818
// This function takes information about a changeset to generate an entry for it in your
@@ -31,7 +31,11 @@ const getReleaseLine = async (changeset, versionType) => {
3131
.map(l => ` ${l}`.trimRight())
3232
.join('\n');
3333

34-
return `- [${versionType}] ${changeset.commit}:\n\n${indentedSummary}`;
34+
return `- [${versionType}] [${
35+
changeset.commit
36+
}](https://github.com/atlassian/extract-react-types/commit/${
37+
changeset.commit
38+
}):\n\n${indentedSummary}`;
3539
};
3640

3741
// This function takes information about what dependencies we are updating in the package.
@@ -47,11 +51,14 @@ const getDependencyReleaseLine = async (changesets, dependenciesUpdated) => {
4751
if (dependenciesUpdated.length === 0) return '';
4852

4953
const changesetLinks = changesets.map(
50-
changeset => `- Updated dependencies [${changeset.commit}]:`,
54+
changeset =>
55+
`- Updated dependencies [${
56+
changeset.commit
57+
}](https://github.com/atlassian/extract-react-types/commit/${changeset.commit}):`
5158
);
5259

5360
const updatedDepenenciesList = dependenciesUpdated.map(
54-
dependency => ` - ${dependency.name}@${dependency.version}`,
61+
dependency => ` - ${dependency.name}@${dependency.version}`
5562
);
5663

5764
return [...changesetLinks, ...updatedDepenenciesList].join('\n');
@@ -67,16 +74,16 @@ const versionOptions = {
6774
// A function that returns a string. It takes in options about a change. This allows you to customise your changelog entries
6875
getReleaseLine,
6976
// A function that returns a string. It takes in options about when a pacakge is updated because
70-
getDependencyReleaseLine,
77+
getDependencyReleaseLine
7178
};
7279

7380
const publishOptions = {
7481
// This sets whether unpublished packages are public by default. We err on the side of caution here.
75-
public: false,
82+
public: true
7683
};
7784

7885
module.exports = {
7986
versionOptions,
8087
changesetOptions,
81-
publishOptions,
88+
publishOptions
8289
};

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
"scripts": {
66
"test": "jest",
77
"changeset": "bolt build-releases changeset",
8+
"version": "bolt build-releases version",
9+
"publish": "yarn build && yarn check && build-releases publish --public",
810
"dev:pretty-proptypes": "bolt w pretty-proptypes run dev",
911
"lint": "yarn eslint \"./**/*.js\"",
1012
"check": "yarn lint && yarn test && yarn flow"
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 Mitchell Hamilton
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

packages/babel-plugin-extract-react-types/package.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,19 @@
33
"version": "0.0.5",
44
"main": "index.js",
55
"license": "MIT",
6+
"repository": "atlassian/extract-react-types",
7+
"description": "Plugin to allow pretty-proptypes to more easily pull in component data",
8+
69
"files": [
710
"index.js"
811
],
12+
"keywords": [
13+
"react",
14+
"flow",
15+
"typescript",
16+
"prop-types",
17+
"documentation"
18+
],
919
"author": "Mitchell Hamilton",
1020
"dependencies": {
1121
"extract-react-types": "^0.15.1"
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 Ben Conolly
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

packages/extract-react-types-loader/package.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22
"name": "extract-react-types-loader",
33
"version": "0.3.0",
44
"main": "index.js",
5+
"repository": "atlassian/extract-react-types",
6+
"description": "Load extract-react-types data given a fiile path, using webpack",
7+
"license": "MIT",
8+
"author": "Ben Conolly",
9+
"keywords": [
10+
"react",
11+
"flow",
12+
"typescript",
13+
"prop-types",
14+
"documentation"
15+
],
516
"dependencies": {
617
"extract-react-types": "^0.15.1"
718
}

packages/extract-react-types/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
{
22
"name": "extract-react-types",
33
"version": "0.15.1",
4-
"main": "index.js",
4+
"main": "src/index.js",
55
"repository": "atlassian/extract-react-types",
6+
"description": "Parse prop-types from react components using typescript or flow",
67
"author": "James Kyle <[email protected]>",
78
"license": "Apache-2.0",
9+
"files": [
10+
"src"
11+
],
812
"keywords": [
913
"react",
1014
"flow",

packages/extract-react-types/index.js renamed to packages/extract-react-types/src/index.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ const matchExported = require('./matchExported');
2020

2121
const converters = {};
2222

23-
const isParentSpecialReactComponentType = (path, type /*:'memo' | 'forwardRef'*/) => {
24-
return isSpecialReactComponentType(path.parentPath, type);
25-
};
26-
2723
const isSpecialReactComponentType = (path, type /*:'memo' | 'forwardRef'*/) => {
2824
if (path && path.isCallExpression()) {
2925
const callee = path.get('callee');
@@ -1583,7 +1579,6 @@ function findExportedComponents(programPath, componentsToFind /*: 'all' | 'defau
15831579
if (innerFirstArg.isFunctionExpression() || innerFirstArg.isArrowFunctionExpression()) {
15841580
let component = convertReactComponentFunction(innerFirstArg, context);
15851581
components.push({ name, path, component });
1586-
return;
15871582
}
15881583
}
15891584
}

0 commit comments

Comments
 (0)