Skip to content

Commit

Permalink
setup pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeshay committed Sep 15, 2023
1 parent 454331a commit 5632ed3
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 15 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ jobs:
with:
node-version: ${{ matrix.node_version }}
cache: "pnpm"
- uses: pnpm/action-setup@v2
with:
version: "8.7.5"
- uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ jobs:
with:
node-version: ${{ inputs.node_version }}
cache: "pnpm"
- uses: pnpm/action-setup@v2
with:
version: "8.7.5"
- run: pnpm install
- run: pnpm run deploy:one infra -- ${{ inputs.stack_environment }}
env:
Expand Down
30 changes: 15 additions & 15 deletions packages/adapter/src/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@ const createEsBuildConfig = (
outDir: string,
{ esBuildOptions = {} }: Args,
) =>
mergeAndConcat(DEFAULT_CONFIG, esBuildOptions, {
banner: {
js: [
"import { createRequire as topLevelCreateRequire } from 'module';",
'const require = topLevelCreateRequire(import.meta.url);',
esBuildOptions.banner?.js ?? '',
].join(''),
},
entryPoints: [entryFile],
format: 'esm',
outdir: outDir,
outExtension: {
'.js': '.mjs',
},
}) as BuildOptions
mergeAndConcat(DEFAULT_CONFIG, esBuildOptions, {
banner: {
js: [
"import { createRequire as topLevelCreateRequire } from 'module';",
"const require = topLevelCreateRequire(import.meta.url);",
esBuildOptions.banner?.js ?? "",
].join(""),
},
entryPoints: [entryFile],
format: "esm",
outdir: outDir,
outExtension: {
".js": ".mjs",
},
}) as BuildOptions

const bundleEntry = async (entryFile: string, outDir: string, args: Args) => {
await build(createEsBuildConfig(entryFile, outDir, args))
Expand Down

0 comments on commit 5632ed3

Please sign in to comment.