Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: long76/react-bootstrap
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: react-bootstrap/react-bootstrap
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
Loading
Showing 1,001 changed files with 53,806 additions and 42,461 deletions.
49 changes: 21 additions & 28 deletions .babelrc.js
Original file line number Diff line number Diff line change
@@ -1,52 +1,45 @@
module.exports = api => {
module.exports = (api) => {
const env = api.env();

let dev = false;
let modules = true;
let setUseClient = false;
let modules;

switch (api.env()) {
switch (env) {
case 'docs':
case 'test':
dev = true;
modules = false;
break;
case 'dist-dev':
dev = true;
modules = false;
break;
case 'dist-prod':
modules = false;
break;
case 'esm':
modules = false;
setUseClient = true;
break;
case 'build':
case 'cjs':
default:
modules = 'commonjs';
setUseClient = true;
break;
}

return {
presets: [
[
'@babel/preset-env',
'@react-bootstrap',
{
loose: true,
shippedProposals: true,
modules: modules ? 'commonjs' : false,
targets: {
browsers: ['last 4 versions', 'not ie <= 8']
}
}
dev,
modules,
removePropTypes: !dev,
setUseClient,
customClientImports: ['useBootstrapPrefix', 'createWithBsPrefix'],
},
],
['@babel/preset-react', { development: dev }]
'@babel/preset-typescript',
],
plugins: [
['@babel/plugin-proposal-class-properties', { loose: true }],
'@babel/plugin-proposal-export-default-from',
'@babel/plugin-proposal-export-namespace-from',
[
'@babel/plugin-transform-runtime',
{ useESModules: !modules, corejs: 2 }
],
'babel-plugin-dev-expression',
modules && 'babel-plugin-add-module-exports',
api.env() === 'test' && 'babel-plugin-istanbul'
].filter(Boolean)
plugins: [env === 'test' && 'istanbul'].filter(Boolean),
};
};
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# EditorConfig is awesome: http://EditorConfig.org
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true
11 changes: 0 additions & 11 deletions .eslintignore

This file was deleted.

106 changes: 0 additions & 106 deletions .eslintrc

This file was deleted.

1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
93 changes: 93 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Bug report
description: Create a report to help us improve
title: "Bug"
labels: [bug]
assignees: "-"
body:
- type: checkboxes
attributes:
label: Prerequisites
description: Take a moment to review
options:
- label: I am using the [correct version](https://github.com/react-bootstrap/react-bootstrap#bootstrap-compatibility) of React-Bootstrap for my version of Bootstrap
required: true
- label: I have [searched](https://github.com/react-bootstrap/react-bootstrap/issues?q=is%3Aissue) for duplicate or closed issues
required: true
- label: I have read the [contributing guidelines](https://github.com/react-bootstrap/react-bootstrap/blob/master/CONTRIBUTING.md)
required: true
- type: textarea
id: bug-description
attributes:
label: Describe the bug
description: Provide a clear and concise description of what the bug is.
validations:
required: true
- type: textarea
id: bug-expected-behavior
attributes:
label: Expected behavior
description: Provide a clear and concise description of what you expected to happen.
- type: textarea
id: bug-steps
attributes:
label: To Reproduce
description: Steps to reproduce the behavior
placeholder: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
- type: input
id: bug-repro
attributes:
label: Reproducible Example
description: Provide a link to the minimum reproduction here. You can fork from [CodeSandbox](https://codesandbox.io/s/github/react-bootstrap/code-sandbox-examples/tree/master/basic) to get started.
placeholder: Paste a link to your reproduction here. Issues without reproductions will be deprioritized.
validations:
required: true
- type: textarea
id: bug-screenshots
attributes:
label: Screenshots
description: If applicable, add screenshots to help explain your problem.
- type: dropdown
id: os
attributes:
label: What operating system(s) are you seeing the problem on?
multiple: true
options:
- Windows
- macOS
- Android
- iOS
- Linux
- type: dropdown
id: browser
attributes:
label: What browser(s) are you seeing the problem on?
multiple: true
options:
- Chrome
- Safari
- Firefox
- Microsoft Edge
- Opera
- type: input
id: react-bootstrap-version
attributes:
label: What version of React-Bootstrap are you using?
placeholder: ex. 2.0.0
validations:
required: true
- type: input
id: bootstrap-version
attributes:
label: What version of Bootstrap are you using?
placeholder: ex. 5.1.3
validations:
required: true
- type: textarea
id: bug-additional
attributes:
label: Additional context
description: Add any other context about the problem here.
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Feature request
description: Suggest an idea for this project
title: "Feature"
labels: [enhancement]
assignees: "-"
body:
- type: textarea
id: feature-description
attributes:
label: Is your feature request related to a problem? Please describe
description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
validations:
required: true
- type: textarea
id: feature-solution
attributes:
label: Describe the solution you'd like
description: A clear and concise description of what you want to happen.
validations:
required: true
- type: textarea
id: feature-alternatives
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered.
- type: textarea
id: feature-additional
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here.
70 changes: 70 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: CI

on:
push:
branches:
- master
pull_request:
branches:
- master

permissions:
contents: read

jobs:
test:
name: Run tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
browser: [chromium, firefox]
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 22.14.0
cache: yarn

- name: Install Dependencies
run: yarn --network-timeout 100000
env:
YARN_CACHE_FOLDER: .cache/yarn

- name: Install Playwright Browsers
run: yarn playwright install --with-deps

- name: Run Tests
run: yarn test-browser --browser.name=${{ env.BROWSER }} --browser.headless --coverage
env:
BROWSER: ${{ matrix.browser }}

- name: Codecov
uses: codecov/codecov-action@v4

build-lint:
name: Build and lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 22.14.0

- name: Install Dependencies
run: yarn --network-timeout 100000

- name: Lint
run: yarn lint

- name: Check types
run: yarn check-types

- name: Build Project
run: yarn build
Loading