Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: minor cleanup & pnpm switch #84

Merged
merged 1 commit into from
Sep 1, 2024
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
4 changes: 2 additions & 2 deletions .github/changeset-version.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ const { execSync } = require("node:child_process");
// So we also run `npm install`, which does this update.
// This is a workaround until this is handled automatically by `changeset version`.
// See https://github.com/changesets/changesets/issues/421.
execSync("npx changeset version");
execSync("npm install");
execSync("pnpm changeset version");
execSync("pnpm install");
35 changes: 27 additions & 8 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
- main
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
check:
name: Check
Expand All @@ -15,14 +19,19 @@ jobs:
with:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9.1.3

- name: Use Node.js 20
uses: actions/setup-node@v3
with:
node-version: 20
cache: "npm" # cache ~/.npm in case 'npm ci' needs to run
cache: "pnpm"

- name: Install NPM Dependencies
run: npm ci
run: pnpm i --frozen-lockfile

- name: Check for formatting issues
run: npm run check:format
Expand All @@ -39,17 +48,22 @@ jobs:
with:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9.1.3

- name: Use Node.js 20
uses: actions/setup-node@v3
with:
node-version: 20
cache: "npm" # cache ~/.npm in case 'npm ci' needs to run
cache: "pnpm"

- name: Install NPM Dependencies
run: npm ci
run: pnpm i --frozen-lockfile

- name: Test
run: npm run test
run: pnpm run test

build:
name: Build
Expand All @@ -60,14 +74,19 @@ jobs:
with:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9.1.3

- name: Use Node.js 20
uses: actions/setup-node@v3
with:
node-version: 20
cache: "npm" # cache ~/.npm in case 'npm ci' needs to run
cache: "pnpm"

- name: Install NPM Dependencies
run: npm ci
run: pnpm i --frozen-lockfile

- name: Build
run: npm run build
run: pnpm run build
21 changes: 13 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,36 @@ jobs:
with:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9.1.3

- name: Setup Node.js 20
uses: actions/setup-node@v3
with:
node-version: 20

- name: Install Dependencies
run: npm ci
run: pnpm i --frozen-lockfile

- name: Check for formatting issues
run: npm run check:format
run: pnpm run check:format

- name: Check for linting issues
run: npm run check:lint

- name: Run tests
run: npm run test
run: pnpm run check:lint

- name: Build
run: npm run build
run: pnpm run build

- name: Run tests
run: pnpm run test

- name: Create Release Pull Request
uses: changesets/action@v1
with:
version: node .github/changeset-version.cjs
publish: npx changeset publish
publish: pnpm exec changeset publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
lib
node_modules
docs
pnpm-lock.yaml
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# D1-Orm

✨ A simple, strictly typed ORM, to assist you in using [Cloudflare's D1 product](https://blog.cloudflare.com/introducing-d1/)
✨ A simple, strictly typed ORM, to assist you in using [Cloudflare's SQLite Database](https://developers.cloudflare.com/d1)

Docs can be found at https://docs.interactions.rest/d1-orm/

Expand All @@ -16,7 +16,7 @@ npm install d1-orm

## Usage

This package is recommended to be used with [@cloudflare/workers-types](https://github.com/cloudflare/workers-types) 3.16.0+.
This package is recommended to be used with [@cloudflare/workers-types](https://github.com/cloudflare/workers-types) 4+.

```ts
import { D1Orm, DataTypes, Model } from "d1-orm";
Expand Down Expand Up @@ -64,5 +64,3 @@ export default {
},
};
```

For more information, refer to the [docs](https://docs.interactions.rest/d1-orm).
Loading
Loading