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
40 changes: 40 additions & 0 deletions .github/workflows/pkg-pr-new.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Publish preview package

on:
push:
branches:
- '**'
- '!main'
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:

jobs:
preview:
name: pkg.pr.new
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
with:
fetch-depth: 1

- name: Install pnpm
uses: pnpm/action-setup@v6
with:
version: 11

- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: 'lts/*'
cache: 'pnpm'

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

- name: Build package
run: pnpm build

- name: Publish preview
run: npx pkg-pr-new publish --no-template
6 changes: 5 additions & 1 deletion gen/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ export const CONFIG: ConfigType = {
RELATIONSHIP_FUNCTIONS: true,
TRIGGER_FUNCTIONS: true,
RESOURCES_FULL_BUNDLE: true,
RESOURCES_INSTANCE_STYLE: 'accessors_only'
// Bundle clients must be isolated per access token. `leazy_loading` emits
// private cache fields + lazy getters that bind each resource to the
// client's own adapter (via `.withAdapter(this.adapter)`), instead of
// `accessors_only` which returned the shared process-global singletons.
RESOURCES_INSTANCE_STYLE: 'leazy_loading'
}
CONFIG.RESOURCES_STANDARD_OBJECT = (CONFIG.RESOURCES_INSTANCE_STYLE === 'standard_object')
CONFIG.RESOURCES_LEAZY_LOADING = (CONFIG.RESOURCES_INSTANCE_STYLE === 'leazy_loading')
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,23 +57,23 @@
"node": ">=20"
},
"devDependencies": {
"@biomejs/biome": "^2.5.1",
"@biomejs/biome": "^2.5.4",
"@commercelayer/js-auth": "^7.4.2",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@types/debug": "^4.1.13",
"@types/node": "^25.9.4",
"@vitest/coverage-v8": "^4.1.9",
"@vitest/eslint-plugin": "^1.6.20",
"@types/node": "^25.9.5",
"@vitest/coverage-v8": "^4.1.10",
"@vitest/eslint-plugin": "^1.6.23",
"conventional-changelog-conventionalcommits": "^9.3.1",
"dotenv": "^17.4.2",
"json-typescript": "^1.1.2",
"jsonapi-typescript": "^0.1.3",
"semantic-release": "^25.0.5",
"semantic-release": "^25.0.7",
"tsup": "^8.5.1",
"tsx": "^4.22.4",
"tsx": "^4.23.1",
"typescript": "^5.9.3",
"vitest": "^4.1.9"
"vitest": "^4.1.10"
},
"repository": "github:commercelayer/commercelayer-sdk",
"bugs": "https://github.com/commercelayer/commercelayer-sdk/issues",
Expand Down
Loading
Loading