Skip to content
Merged
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
5 changes: 5 additions & 0 deletions .changeset/fix-cjs-require-types.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"txob": patch
---

Fix CommonJS consumers: each export now gives `require` its own CommonJS type declarations, the build no longer copies a `"type": "module"` package.json into `dist/`, and `engines.node` is now `^20.19.0 || >=22.12.0` (the versions that can `require()` the ESM-only `p-limit` and `p-queue`).
14 changes: 9 additions & 5 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,17 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up pnpm
uses: pnpm/action-setup@v4

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: pnpm

- name: Install dependencies
run: yarn install
run: pnpm install --frozen-lockfile

- name: Start MongoDB replica set
run: |
Expand All @@ -50,13 +54,13 @@ jobs:
docker run -d --name dynamodb -p 8000:8000 amazon/dynamodb-local:latest

- name: Generate Prisma Client for the adapter tests
run: yarn test:prepare
run: pnpm test:prepare

- name: Typecheck
run: yarn typecheck
run: pnpm typecheck

- name: Run the tests
run: yarn test:ci
run: pnpm test:ci
env:
TXOB_TEST_PG_URL: postgres://postgres:txob@localhost:5432/postgres
TXOB_TEST_MONGO_URL: mongodb://localhost:27017/?directConnection=true
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,30 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up pnpm
uses: pnpm/action-setup@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22.x
registry-url: https://registry.npmjs.org
cache: pnpm

# Trusted publishing needs npm 11.5.1 or newer; Node 22 ships with npm 10
- name: Update npm
run: npm install -g npm@11

- name: Install dependencies
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile

# With pending changesets, opens or updates the "Version Packages" PR. When that PR is
# merged (no changesets left, version not yet on npm), builds and publishes to npm.
- name: Create release PR or publish to npm
uses: changesets/action@v1
with:
version: yarn version-packages
publish: yarn release
version: pnpm version-packages
publish: pnpm release
commit: "chore: version packages"
title: "chore: version packages"
createGithubReleases: true
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -684,9 +684,9 @@ UserCreated: {

## Contributing

Run `yarn test` for unit tests and the in-memory store. The store tests run against real databases when their URL is set: `TXOB_TEST_PG_URL`, `TXOB_TEST_MONGO_URL` (a replica set), `TXOB_TEST_REDIS_URL` and `TXOB_TEST_DYNAMODB_URL` (see `.github/workflows/coverage.yml` for the containers). Run `yarn test:prepare` first to generate the Prisma Client the ORM adapter tests use.
Run `pnpm test` for unit tests and the in-memory store. The store tests run against real databases when their URL is set: `TXOB_TEST_PG_URL`, `TXOB_TEST_MONGO_URL` (a replica set), `TXOB_TEST_REDIS_URL` and `TXOB_TEST_DYNAMODB_URL` (see `.github/workflows/coverage.yml` for the containers). Run `pnpm test:prepare` first to generate the Prisma Client the ORM adapter tests use.

If your change affects users, add a changeset with `yarn changeset`: pick patch, minor or major, and describe the change for the changelog.
If your change affects users, add a changeset with `pnpm changeset`: pick patch, minor or major, and describe the change for the changelog.

**Releasing** is automated with [Changesets](https://github.com/changesets/changesets). When changesets land on `main`, the release workflow opens a "Version Packages" PR that bumps the version and updates `CHANGELOG.md`. Merging that PR publishes to npm with provenance and creates a GitHub release.

Expand Down
Loading
Loading