diff --git a/.babelrc.js b/.babelrc.js index d159fb8da5..d1326d1df9 100644 --- a/.babelrc.js +++ b/.babelrc.js @@ -1,4 +1,4 @@ -module.exports = (api) => { +export default (api) => { const env = api.env(); let dev = false; @@ -35,7 +35,11 @@ module.exports = (api) => { modules, removePropTypes: !dev, setUseClient, - customClientImports: ['useBootstrapPrefix', 'createWithBsPrefix'], + customClientImports: [ + 'useBootstrapPrefix', + 'createWithBsPrefix', + 'useCol', + ], }, ], '@babel/preset-typescript', diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 63d1a2fcd0..3d2206b285 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,8 +12,8 @@ permissions: contents: read jobs: - ci: - name: CI + test: + name: Run tests runs-on: ${{ matrix.os }} strategy: matrix: @@ -26,20 +26,17 @@ jobs: - name: Setup Node.js environment uses: actions/setup-node@v4 with: - node-version: 20.x + node-version: 22.14.0 cache: yarn - name: Install Dependencies - run: yarn bootstrap + run: yarn --network-timeout 100000 env: YARN_CACHE_FOLDER: .cache/yarn - name: Install Playwright Browsers run: yarn playwright install --with-deps - - name: Run lint - run: yarn lint - - name: Run Tests run: yarn test-browser --browser.name=${{ env.BROWSER }} --browser.headless --coverage env: @@ -48,5 +45,26 @@ jobs: - 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 diff --git a/.gitignore b/.gitignore index 695521f0d3..44349a78dd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ - - lib/ +cjs/ coverage/ www/.cache/ www/public/ @@ -93,3 +92,6 @@ typings/ # Generated types /types + +.yalc +yalc.lock diff --git a/.nvmrc b/.nvmrc index 2bd5a0a98a..7d41c735d7 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -22 +22.14.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fe4324f80..3b2bb20f5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,50 @@ +# [3.0.0-beta.3](https://github.com/react-bootstrap/react-bootstrap/compare/v3.0.0-beta.2...v3.0.0-beta.3) (2025-07-28) + + +### Features + +* **AccordionHeader:** add disabled prop ([#6940](https://github.com/react-bootstrap/react-bootstrap/issues/6940)) ([376c9ae](https://github.com/react-bootstrap/react-bootstrap/commit/376c9aeda3bf86ce88f36e42e6f78c66eb8ced4f)) +* add better ESM support ([#6939](https://github.com/react-bootstrap/react-bootstrap/issues/6939)) ([e9e9457](https://github.com/react-bootstrap/react-bootstrap/commit/e9e9457c9b4d4d677d33c8fb664f7082fc0da304)) + + + + + +# [3.0.0-beta.2](https://github.com/react-bootstrap/react-bootstrap/compare/v3.0.0-beta.1...v3.0.0-beta.2) (2025-05-24) + + +### Bug Fixes + +* **Col:** add missing use client directive ([#6930](https://github.com/react-bootstrap/react-bootstrap/issues/6930)) ([ce56013](https://github.com/react-bootstrap/react-bootstrap/commit/ce56013668f988b141726a71b752ed05cf26c781)) + + + + + +# [3.0.0-beta.1](https://github.com/react-bootstrap/react-bootstrap/compare/v2.10.9...v3.0.0-beta.1) (2025-05-24) + + +* feat!: migrate to clsx (#6929) ([bd80db2](https://github.com/react-bootstrap/react-bootstrap/commit/bd80db2f502df3b4122aec0b263fc4ca479db928)), closes [#6929](https://github.com/react-bootstrap/react-bootstrap/issues/6929) +* feat(Offcanvas)!: change rendering behavior (#6927) ([36e824c](https://github.com/react-bootstrap/react-bootstrap/commit/36e824cf6433734016fca71dd8284f2fc49cf136)), closes [#6927](https://github.com/react-bootstrap/react-bootstrap/issues/6927) +* feat!: remove prop types (#6920) ([393dac8](https://github.com/react-bootstrap/react-bootstrap/commit/393dac852f1f85d7315ad8c7eaefe1a02e57e04e)), closes [#6920](https://github.com/react-bootstrap/react-bootstrap/issues/6920) +* feat!: extract hooks from component files (#6915) ([8747836](https://github.com/react-bootstrap/react-bootstrap/commit/874783655635c9c9b90bb084dd99b17a8f47c29e)), closes [#6915](https://github.com/react-bootstrap/react-bootstrap/issues/6915) +* feat!: update to react 19 (#6912) ([c707a3c](https://github.com/react-bootstrap/react-bootstrap/commit/c707a3c0132d81077c2ba242972297c8f38693ba)), closes [#6912](https://github.com/react-bootstrap/react-bootstrap/issues/6912) +* feat!: add exports map (#6901) ([20c8687](https://github.com/react-bootstrap/react-bootstrap/commit/20c86879c99972e5ad8e6f3dee5e451f81c90931)), closes [#6901](https://github.com/react-bootstrap/react-bootstrap/issues/6901) + + +### BREAKING CHANGES + +* Switch from classnames to clsx +* Offcanvas will always be rendered inline in the DOM and not at the body using a portal +* Remove prop-types +* Extract the useCol and useAccordionButton from Col.tsx and AccordionButton.tsx so the CJS default export is consistent with other components +* Support only React 18+. Updates internal code for React 19 and remove deprecated methods. +* Add package.json exports map and remove proxy directories. Removes SSR utilities. + + + + + ## [2.10.9](https://github.com/react-bootstrap/react-bootstrap/compare/v2.10.8...v2.10.9) (2025-01-30) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 93b3c070b7..a3e02b5d50 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -26,7 +26,7 @@ All commits that fix bugs or add features need a test. You can run `npm run tdd ## API Design -Try and be consistent with the overall style and API of the library as a whole. Generally, we avoid monolithic or very high level component APIs. React bootstrap is a toolbox! Prefer to split components out into "sub components" as they make sense. This is usually indicated by the bootstrap CSS classes, e.g. `.nav`, `.nav-item`, and `.nav-link` translate into `