Skip to content

Commit 37286f1

Browse files
authored
Merge branch 'sortable-example' into multiselect-sort
2 parents edf29ee + 1c002f0 commit 37286f1

File tree

23 files changed

+377
-617
lines changed

23 files changed

+377
-617
lines changed

.changeset/config.js

Lines changed: 0 additions & 89 deletions
This file was deleted.

.changeset/config.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": "./getChangelogEntry",
4+
"commit": false,
5+
"linked": [],
6+
"access": "public"
7+
}

.changeset/getChangelogEntry.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
require('dotenv').config();
2+
const { getInfo } = require('@changesets/get-github-info');
3+
4+
const getReleaseLine = async (changeset, type) => {
5+
const [firstLine, ...futureLines] = changeset.summary
6+
.split('\n')
7+
.map(l => l.trimRight());
8+
let { links } = await getInfo({
9+
repo: 'JedWatson/react-select',
10+
commit: changeset.commit,
11+
});
12+
return `- ${links.commit}${links.pull === null ? '' : ` ${links.pull}`}${
13+
links.user === null ? '' : ` Thanks ${links.user}!`
14+
} - ${firstLine}\n${futureLines.map(l => ` ${l}`).join('\n')}`;
15+
};
16+
17+
const getDependencyReleaseLine = async (changesets, dependenciesUpdated) => {
18+
if (dependenciesUpdated.length === 0) return '';
19+
20+
const changesetLinks = changesets.map(
21+
changeset => `- Updated dependencies [${changeset.commit}]:`
22+
);
23+
24+
const updatedDepenenciesList = dependenciesUpdated.map(
25+
dependency => ` - ${dependency.name}@${dependency.version}`
26+
);
27+
28+
return [...changesetLinks, ...updatedDepenenciesList].join('\n');
29+
};
30+
31+
module.exports = {
32+
getReleaseLine,
33+
getDependencyReleaseLine,
34+
};

.circleci/config.yml

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ docker_defaults: &docker_defaults
44
docker:
55
- image: cypress/base:8
66
environment:
7-
TERM: xterm
7+
TERM: xterm
88
working_directory: ~/project/repo
99

1010
attach_workspace: &attach_workspace
@@ -15,36 +15,36 @@ install_steps: &install_steps
1515
steps:
1616
- checkout
1717
- restore_cache:
18-
name: Restore node_modules cache
19-
keys:
20-
- dependency-cache-{{ .Branch }}-{{ checksum "package.json" }}
21-
- dependency-cache-{{ .Branch }}-
22-
- dependency-cache-
18+
name: Restore node_modules cache
19+
keys:
20+
- dependency-cache-{{ .Branch }}-{{ checksum "package.json" }}
21+
- dependency-cache-{{ .Branch }}-
22+
- dependency-cache-
2323
- run:
24-
name: Installing Dependencies
25-
command: |
26-
yarn install --silent
24+
name: Installing Dependencies
25+
command: |
26+
yarn install --silent
2727
- save_cache:
28-
name: Save node_modules cache
29-
key: dependency-cache-{{ .Branch }}-{{ checksum "package.json" }}
30-
paths:
31-
- node_modules/
28+
name: Save node_modules cache
29+
key: dependency-cache-{{ .Branch }}-{{ checksum "package.json" }}
30+
paths:
31+
- node_modules/
3232
- persist_to_workspace:
33-
root: ~/project
34-
paths:
35-
- repo
33+
root: ~/project
34+
paths:
35+
- repo
3636

3737
workflows:
3838
version: 2
3939
build_pipeline:
4040
jobs:
4141
- build
4242
- unit_test:
43-
requires:
44-
- build
43+
requires:
44+
- build
4545
- end_to_end:
46-
requires:
47-
- build
46+
requires:
47+
- build
4848
jobs:
4949
build:
5050
<<: *docker_defaults
@@ -54,16 +54,17 @@ jobs:
5454
steps:
5555
- *attach_workspace
5656
- run:
57-
name: Running unit tests
58-
command: |
59-
yarn lint
60-
yarn test:jest
61-
yarn coveralls
57+
name: Running unit tests
58+
command: |
59+
yarn lint
60+
yarn flow check --flowconfig-name=.flowconfig-ci
61+
yarn test:jest
62+
yarn coveralls
6263
end_to_end:
6364
<<: *docker_defaults
6465
steps:
6566
- *attach_workspace
6667
- run:
67-
name: Running E2E tests
68-
command: |
69-
yarn e2e
68+
name: Running E2E tests
69+
command: |
70+
yarn e2e

.flowconfig-ci

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[ignore]
2+
.*/node_modules/cypress/.*
3+
4+
[untyped]
5+
.*/node_modules/@atlaskit/tooltip/dist/cjs/components/Marshal.js.flow
6+
.*/node_modules/@atlaskit/layer-manager/dist/cjs/components/FocusLock/index.js.flow
7+
.*/node_modules/@atlaskit/layer-manager/dist/cjs/components/gateway/components/Gateway.js.flow
8+
.*/node_modules/@atlaskit/layer-manager/dist/cjs/components/withRenderTarget.js.flow
9+
10+
[include]
11+
12+
[libs]
13+
flow-typed
14+
15+
[lints]
16+
unclear-type=warn
17+
untyped-type-import=error
18+
19+
[options]
20+
module.name_mapper='\!\!raw-loader\!.*' -> '<PROJECT_ROOT>/typings/raw-loader.js'
21+
module.name_mapper='\!\!extract-react-types-loader\!.*' -> '<PROJECT_ROOT>/typings/extract-react-types-loader.js'
22+
server.max_workers=1
23+
sharedmemory.hash_table_pow=21
24+
25+
[strict]

.github/workflows/release.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
release:
10+
name: Release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Repo
14+
uses: actions/checkout@master
15+
16+
- name: Setup Node.js 10.x
17+
uses: actions/setup-node@master
18+
with:
19+
node-version: 10.x
20+
21+
- name: Install Yarn
22+
run: npm install --global yarn
23+
24+
- name: Install Dependencies
25+
run: yarn
26+
27+
- name: Create Release Pull Request or Publish to npm
28+
uses: changesets/action@master
29+
with:
30+
publish: yarn release
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.4.0
1+
10

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,10 @@ class App extends React.Component {
5252
selectedOption: null,
5353
};
5454
handleChange = selectedOption => {
55-
this.setState({ selectedOption });
56-
console.log(`Option selected:`, selectedOption);
55+
this.setState(
56+
{ selectedOption },
57+
() => console.log(`Option selected:`, this.state.selectedOption)
58+
);
5759
};
5860
render() {
5961
const { selectedOption } = this.state;
@@ -83,6 +85,7 @@ Common props you may want to specify include:
8385
- `onChange` - subscribe to change events
8486
- `options` - specify the options the user can select from
8587
- `placeholder` - change the text displayed when no option is selected
88+
- `noOptionsMessage` - ({ inputValue: string }) => string | null - Text to display when there are no options
8689
- `value` - control the current value
8790

8891
See the [props documentation](https://www.react-select.com/props) for complete documentation on the props react-select supports.

docs/App/Header.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class Header extends Component<HeaderProps, HeaderState> {
117117
componentDidMount() {
118118
this.getStarCount();
119119
}
120-
componentWillReceiveProps({ location }: HeaderProps) {
120+
UNSAFE_componentWillReceiveProps({ location }: HeaderProps) {
121121
const valid = ['/', '/home'];
122122
const shouldCollapse = !valid.includes(this.props.location.pathname);
123123
if (location.pathname !== this.props.location.pathname && shouldCollapse) {

docs/pages/advanced/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ export default function Advanced() {
234234
~~~
235235
236236
for more ways you can do this (including critical CSS) see the
237-
[Emotion SSR Docs](https://github.com/emotion-js/emotion/blob/master/docs/ssr.md)
237+
[Emotion SSR Docs](https://emotion.sh/docs/ssr)
238238
239239
240240
## Experimental

0 commit comments

Comments
 (0)