Skip to content

Commit

Permalink
Chore: minor cleanup & pnpm switch (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
Skye-31 authored Sep 1, 2024
1 parent 089a8c2 commit 01e0307
Show file tree
Hide file tree
Showing 10 changed files with 4,827 additions and 14,463 deletions.
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

0 comments on commit 01e0307

Please sign in to comment.