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
47 changes: 47 additions & 0 deletions .github/workflows/nested-package-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Nested package build
on:
pull_request:
paths: ['tsdown.config.*', 'package.json', 'pnpm-lock.yaml', 'tsconfig.json', '.github/workflows/nested-package-build.yml']
permissions:
contents: read
jobs:
prepare:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
path: node_modules/source-consumer
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020
with:
node-version: '24.18.0'
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271
with:
package_json_file: node_modules/source-consumer/package.json
- name: Install and prepare from the same path class as a Git dependency
working-directory: node_modules/source-consumer
run: |
set -eu
mkdir -p "$RUNNER_TEMP/nested-proof"
git rev-parse HEAD > "$RUNNER_TEMP/nested-proof/head.txt"
pnpm install --frozen-lockfile > "$RUNNER_TEMP/nested-proof/install.log" 2>&1 || { tail -100 "$RUNNER_TEMP/nested-proof/install.log"; exit 1; }
pnpm exec tsc --noEmit > "$RUNNER_TEMP/nested-proof/types.log" 2>&1 || { tail -100 "$RUNNER_TEMP/nested-proof/types.log"; exit 1; }
pnpm build > "$RUNNER_TEMP/nested-proof/build.log" 2>&1 || { tail -100 "$RUNNER_TEMP/nested-proof/build.log"; exit 1; }
node --input-type=module - <<'JS'
import assert from 'node:assert/strict';
const oauth = await import('./dist/connectors/oauth.js');
const hub = await import('./dist/hub.js');
const sandbox = await import('./dist/sandbox.js');
assert.equal(typeof oauth.startOAuthFlow, 'function');
assert.equal(typeof oauth.exchangeAuthorizationCode, 'function');
assert.equal(typeof hub.IntegrationHub, 'function');
assert.equal(typeof sandbox.buildIntegrationInvocationEnvelope, 'function');
JS
git diff --exit-code -- package.json pnpm-lock.yaml
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
if: always()
with:
name: nested-package-build
path: ${{ runner.temp }}/nested-proof/
retention-days: 7
2 changes: 1 addition & 1 deletion tests/release.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const FIXTURE_PATHS = [
'scripts',
'src',
'tsconfig.json',
'tsdown.config.ts',
'tsdown.config.mjs',
]

describe('release entry point', () => {
Expand Down
4 changes: 3 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"moduleResolution": "Bundler",
"types": ["node"],
"strict": true,
"allowJs": true,
"checkJs": true,
"declaration": true,
"declarationMap": true,
"sourceMap": true,
Expand All @@ -13,5 +15,5 @@
"skipLibCheck": true,
"outDir": "dist"
},
"include": ["src", "tests", "tsdown.config.ts"]
"include": ["src", "tests", "tsdown.config.mjs"]
}
9 changes: 5 additions & 4 deletions tsdown.config.ts → tsdown.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { defineConfig } from 'tsdown'

export default defineConfig({
/** @type {import('tsdown').UserConfig} */
const config = {
entry: {
index: 'src/index.ts',
consumer: 'src/consumer.ts',
Expand Down Expand Up @@ -34,4 +33,6 @@ export default defineConfig({
dts: true,
sourcemap: true,
target: 'es2022',
})
}

export default config
Loading