Skip to content

Commit

Permalink
Merge branch 'master' into pr/3360
Browse files Browse the repository at this point in the history
  • Loading branch information
JedWatson committed Mar 18, 2021
2 parents 08aac4c + 53371d5 commit 3ae7d23
Show file tree
Hide file tree
Showing 227 changed files with 17,441 additions and 14,724 deletions.
98 changes: 0 additions & 98 deletions .TODO.md

This file was deleted.

14 changes: 0 additions & 14 deletions .babelrc

This file was deleted.

36 changes: 36 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works with `bolt` to help you release components from a mono-repository. You can find the full documentation for it [here](https://www.npmjs.com/package/@changesets/cli)

To help you get started though, here are some things you should know about this folder:

## Changesets are automatically generated

Changesets are generated by the `yarn changeset` or `npx changeset` command. As long as you are following a changeset release flow, you shouldn't have any problems.

## Each changeset is its own folder

We use hashes by default for these folder names to avoid collisions when generating them, but there's no harm that will come from renaming them.

## Changesets are automatically removed

When `changeset bump` or equivalent command is run, all the changeset folders are removed. This is so we only ever use a changeset once. This makes this a very bad place to store any other information.

## Changesets come in two parts

You should treat these parts quite differently:

- `changes.md` is a file you should feel free to edit as much as you want. It will be prepended to your changelog when you next run your version command.
- `changes.json` is a file that includes information about releases, what should be versioned by the version command. We strongly recommend against editing this directly, as you may make a new changeset that puts your bolt repository into an invalid state.

## I want to edit the information in a `changes.json` - how do I do it safely?

The best option is to make a new changeset using the changeset command, copy over the `changes.md`, then delete the old changeset.

## Can I rename the folder for my changeset?

Absolutely! We need unique hashes to make changesets play nicely with git, but changing your folder from our hash to your own name isn't going to cause any problems.

## Can I manually delete changesets?

You can, but you should be aware this will remove the intent to release communicated by the changeset, and should be done with caution.
7 changes: 7 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "https://unpkg.com/@changesets/config@0.2.1/schema.json",
"changelog": "./getChangelogEntry",
"commit": false,
"linked": [],
"access": "public"
}
5 changes: 5 additions & 0 deletions .changeset/fair-panthers-marry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-select": patch
---

The Menu bottom is no longer scrolled into view when menuShouldScrollIntoView=false
34 changes: 34 additions & 0 deletions .changeset/getChangelogEntry.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
require('dotenv').config();
const { getInfo } = require('@changesets/get-github-info');

const getReleaseLine = async (changeset, type) => {
const [firstLine, ...futureLines] = changeset.summary
.split('\n')
.map(l => l.trimRight());
let { links } = await getInfo({
repo: 'JedWatson/react-select',
commit: changeset.commit,
});
return `- ${links.commit}${links.pull === null ? '' : ` ${links.pull}`}${
links.user === null ? '' : ` Thanks ${links.user}!`
} - ${firstLine}\n${futureLines.map(l => ` ${l}`).join('\n')}`;
};

const getDependencyReleaseLine = async (changesets, dependenciesUpdated) => {
if (dependenciesUpdated.length === 0) return '';

const changesetLinks = changesets.map(
changeset => `- Updated dependencies [${changeset.commit}]:`
);

const updatedDepenenciesList = dependenciesUpdated.map(
dependency => ` - ${dependency.name}@${dependency.version}`
);

return [...changesetLinks, ...updatedDepenenciesList].join('\n');
};

module.exports = {
getReleaseLine,
getDependencyReleaseLine,
};
64 changes: 35 additions & 29 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ version: 2

docker_defaults: &docker_defaults
docker:
- image: cypress/base:8
- image: cypress/browsers:node12.18.0-chrome83-ff77
environment:
TERM: xterm
TERM: xterm
working_directory: ~/project/repo

attach_workspace: &attach_workspace
Expand All @@ -15,36 +15,37 @@ install_steps: &install_steps
steps:
- checkout
- restore_cache:
name: Restore node_modules cache
keys:
- dependency-cache-{{ .Branch }}-{{ checksum "package.json" }}
- dependency-cache-{{ .Branch }}-
- dependency-cache-
name: Restore node_modules cache
keys:
- dependency-cache-{{ .Branch }}-{{ checksum "yarn.lock" }}
- dependency-cache-{{ .Branch }}-
- dependency-cache-
- cache-{{ checksum "package.json" }}
- run:
name: Installing Dependencies
command: |
yarn install --silent
name: Installing Dependencies
command: |
yarn install --silent
- save_cache:
name: Save node_modules cache
key: dependency-cache-{{ .Branch }}-{{ checksum "package.json" }}
paths:
- node_modules/
name: Save node_modules cache
key: dependency-cache-{{ .Branch }}-{{ checksum "package.json" }}
paths:
- ~/.cache
- persist_to_workspace:
root: ~/project
paths:
- repo
root: ~/project
paths:
- repo

workflows:
version: 2
build_pipeline:
jobs:
- build
- unit_test:
requires:
- build
requires:
- build
- end_to_end:
requires:
- build
requires:
- build
jobs:
build:
<<: *docker_defaults
Expand All @@ -54,16 +55,21 @@ jobs:
steps:
- *attach_workspace
- run:
name: Running unit tests
command: |
yarn lint
yarn test:jest
yarn coveralls
name: Running unit tests
command: |
yarn prettier:check
yarn lint
yarn flow check --flowconfig-name=.flowconfig-ci
yarn test:jest
yarn coveralls
end_to_end:
<<: *docker_defaults
steps:
- *attach_workspace
- run:
name: Running E2E tests
command: |
yarn e2e
name: Running E2E tests
command: |
yarn global add cypress
yarn install --silent
yarn cypress install
yarn e2e
8 changes: 8 additions & 0 deletions .codesandbox/ci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@


{
"buildCommand": "build",
"packages": ["packages/*"],
"sandboxes": ["nfmxw"]
}

3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
coverage/*
cypress/plugins/*
cypress/support/*
dist/*
**/dist/*
flow-typed/*
lib/*
node_modules/*
**/node_modules/*
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module.exports = {
extends: ['plugin:react-hooks/recommended'],
parser: 'babel-eslint',
env: {
browser: true,
Expand All @@ -14,6 +15,7 @@ module.exports = {
argsIgnorePattern: '^event$',
ignoreRestSiblings: true,
vars: 'all',
varsIgnorePattern: 'jsx|emotionJSX',
},
],
curly: [2, 'multi-line'],
Expand Down
9 changes: 7 additions & 2 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
[ignore]
./lib/.*
./dist/.*
.*/node_modules/cypress/.*

[untyped]
.*/node_modules/@atlaskit/tooltip/dist/cjs/components/Marshal.js.flow
.*/node_modules/@atlaskit/layer-manager/dist/cjs/components/FocusLock/index.js.flow
.*/node_modules/@atlaskit/layer-manager/dist/cjs/components/gateway/components/Gateway.js.flow
.*/node_modules/@atlaskit/layer-manager/dist/cjs/components/withRenderTarget.js.flow

[include]

[libs]
flow-typed

[lints]
unclear-type=warn
untyped-type-import=error

[options]
module.name_mapper='\!\!raw-loader\!.*' -> '<PROJECT_ROOT>/typings/raw-loader.js'
Expand Down
25 changes: 25 additions & 0 deletions .flowconfig-ci
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[ignore]
.*/node_modules/cypress/.*

[untyped]
.*/node_modules/@atlaskit/tooltip/dist/cjs/components/Marshal.js.flow
.*/node_modules/@atlaskit/layer-manager/dist/cjs/components/FocusLock/index.js.flow
.*/node_modules/@atlaskit/layer-manager/dist/cjs/components/gateway/components/Gateway.js.flow
.*/node_modules/@atlaskit/layer-manager/dist/cjs/components/withRenderTarget.js.flow

[include]

[libs]
flow-typed

[lints]
unclear-type=warn
untyped-type-import=error

[options]
module.name_mapper='\!\!raw-loader\!.*' -> '<PROJECT_ROOT>/typings/raw-loader.js'
module.name_mapper='\!\!extract-react-types-loader\!.*' -> '<PROJECT_ROOT>/typings/extract-react-types-loader.js'
server.max_workers=1
sharedmemory.hash_table_pow=21

[strict]
Loading

0 comments on commit 3ae7d23

Please sign in to comment.