Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works with multi-package repos, or single-package repos to help you version and publish your code. You can find the full documentation for it [in the changesets repo](https://github.com/changesets/changesets).

## How to contribute a changeset

Before merging your PR, you should add a changeset if your change affects any of the published packages.

1. Run `bun run changeset` in the root of the repository
2. Select the packages that are affected by your change
3. Choose the type of version bump (major, minor, or patch)
4. Write a summary of your changes that will be included in the changelog

All published `@docsearch/*` packages use a single version (fixed versioning). This means when one package is bumped, all packages get the same version.

## Releasing

When changesets are present in the `main` branch, the CI will create a "Version Packages" PR that bumps versions and updates changelogs. Merging that PR will trigger the publish workflow.
25 changes: 25 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [
[
"@docsearch/css",
"@docsearch/core",
"@docsearch/js",
"@docsearch/modal",
"@docsearch/react",
"@docsearch/sidepanel",
"@docsearch/sidepanel-js"
]
],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": [
"@docsearch/website",
"@docsearch/react-example",
"@docsearch/js-example"
]
}
105 changes: 61 additions & 44 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
version: 2.1

aliases:
- &restore_yarn_cache
name: Restore Yarn cache
- &install_bun
name: Install Bun
command: |
npm install -g bun

- &restore_bun_cache
name: Restore Bun cache
keys:
- yarn-packages-{{ checksum "yarn.lock" }}
- bun-packages-{{ checksum "bun.lock" }}

- &save_yarn_cache
name: Save Yarn cache
key: yarn-packages-{{ checksum "yarn.lock" }}
- &save_bun_cache
name: Save Bun cache
key: bun-packages-{{ checksum "bun.lock" }}
paths:
- .yarn/cache
- .yarn/unplugged
- ~/.bun/install/cache

- &run_yarn_install
- &run_bun_install
name: Install dependencies
command: yarn install --immutable
command: bun install --frozen-lockfile

- &restore_dist_folders
name: Restore dist folders
Expand Down Expand Up @@ -43,10 +47,10 @@ defaults: &defaults
docker:
- image: cimg/node:22.15.0

cypress: &cypress
playwright: &playwright
working_directory: ~/docsearch
docker:
- image: cypress/browsers:node-22.15.0-chrome-136.0.7103.113-1-ff-138.0.3-edge-136.0.3240.64-1
- image: mcr.microsoft.com/playwright:v1.49.1-noble
environment:
## this enables colors in the output
TERM: xterm
Expand All @@ -62,13 +66,14 @@ jobs:
<<: *defaults
steps:
- checkout
- restore_cache: *restore_yarn_cache
- run: *run_yarn_install
- save_cache: *save_yarn_cache
- run: *install_bun
- restore_cache: *restore_bun_cache
- run: *run_bun_install
- save_cache: *save_bun_cache
- run:
name: Build and Size
command: |
yarn run build
bun run build
- run:
name: Move dist folders to workspace
command: |
Expand Down Expand Up @@ -98,57 +103,62 @@ jobs:
steps:
- checkout
- *attach_workspace
- restore_cache: *restore_yarn_cache
- run: *run_yarn_install
- save_cache: *save_yarn_cache
- run: *install_bun
- restore_cache: *restore_bun_cache
- run: *run_bun_install
- save_cache: *save_bun_cache
- run: *restore_dist_folders
- run:
name: Linting
command: yarn run lint
command: bun run lint
test_types:
<<: *defaults
steps:
- checkout
- *attach_workspace
- restore_cache: *restore_yarn_cache
- run: *run_yarn_install
- save_cache: *save_yarn_cache
- run: *install_bun
- restore_cache: *restore_bun_cache
- run: *run_bun_install
- save_cache: *save_bun_cache
- run: *restore_dist_folders
- run:
name: Type checking
command: yarn run test:types
command: bun run test:types
test_size:
<<: *defaults
steps:
- checkout
- *attach_workspace
- restore_cache: *restore_yarn_cache
- run: *run_yarn_install
- save_cache: *save_yarn_cache
- run: *install_bun
- restore_cache: *restore_bun_cache
- run: *run_bun_install
- save_cache: *save_bun_cache
- run: *restore_dist_folders
- run:
name: Size checking
command: yarn run test:size
command: bun run test:size
test_unit:
<<: *defaults
steps:
- checkout
- *attach_workspace
- restore_cache: *restore_yarn_cache
- run: *run_yarn_install
- save_cache: *save_yarn_cache
- run: *install_bun
- restore_cache: *restore_bun_cache
- run: *run_bun_install
- save_cache: *save_bun_cache
- run: *restore_dist_folders
- run:
name: Unit tests
command: yarn run test
command: bun run test
release:
<<: *defaults
steps:
- checkout
- *attach_workspace
- restore_cache: *restore_yarn_cache
- run: *run_yarn_install
- save_cache: *save_yarn_cache
- run: *install_bun
- restore_cache: *restore_bun_cache
- run: *run_bun_install
- save_cache: *save_bun_cache
- run: *restore_dist_folders
- run:
name: Setup git user
Expand All @@ -157,19 +167,26 @@ jobs:
git config --global user.name "algolia-bot"
- run:
name: Release if needed
command: yarn run shipjs trigger
test_cypress:
<<: *cypress
command: bun run release
test_playwright:
<<: *playwright
steps:
- checkout
- *attach_workspace
- restore_cache: *restore_yarn_cache
- run: *run_yarn_install
- save_cache: *save_yarn_cache
- run: *install_bun
- restore_cache: *restore_bun_cache
- run: *run_bun_install
- save_cache: *save_bun_cache
- run: *restore_dist_folders
- run:
name: Cypress test Actions
command: yarn run cy:run
name: Playwright E2E tests
command: bun run pw:run
- store_artifacts:
path: playwright-report
destination: playwright-report
- store_artifacts:
path: test-results
destination: test-results

workflows:
version: 2
Expand All @@ -188,7 +205,7 @@ workflows:
- test_unit:
requires:
- build
- test_cypress:
- test_playwright:
requires:
- build
- release:
Expand Down
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ dist/
# Environment files
.env

# Cypress Video and Screenshots output
cypress/screenshots/
cypress/videos/
# Playwright output
playwright-report/
test-results/

**/.yarn/*
!**/.yarn/releases
!**/.yarn/plugins
!**/.yarn/patches

rollup.config-*.cjs
rollup.config-*.cjs
Loading