Skip to content

Commit 6d0e2ef

Browse files
authored
Merge pull request #75 from crazy-max/esm
switch to ESM and update config wiring
2 parents c624246 + 41d6f6a commit 6d0e2ef

15 files changed

Lines changed: 512 additions & 995 deletions

.eslintignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

.eslintrc.json

Lines changed: 0 additions & 21 deletions
This file was deleted.

.prettierrc.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@
66
"singleQuote": true,
77
"trailingComma": "none",
88
"bracketSpacing": false,
9-
"arrowParens": "avoid",
10-
"parser": "typescript"
9+
"arrowParens": "avoid"
1110
}

codecov.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

dev.Dockerfile

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
ARG NODE_VERSION=20
44

55
FROM node:${NODE_VERSION}-alpine AS base
6-
RUN apk add --no-cache cpio findutils git
6+
RUN apk add --no-cache cpio findutils git rsync
77
WORKDIR /src
88
RUN --mount=type=bind,target=.,rw \
99
--mount=type=cache,target=/src/.yarn/cache <<EOT
10+
set -e
1011
corepack enable
1112
yarn --version
1213
yarn config set --home enableTelemetry 0
@@ -34,18 +35,27 @@ RUN --mount=type=bind,target=.,rw <<EOT
3435
EOT
3536

3637
FROM deps AS build
37-
RUN --mount=type=bind,target=.,rw \
38+
RUN --mount=target=/context \
3839
--mount=type=cache,target=/src/.yarn/cache \
39-
--mount=type=cache,target=/src/node_modules \
40-
yarn run build && mkdir /out && cp -Rf dist /out/
40+
--mount=type=cache,target=/src/node_modules <<EOT
41+
set -e
42+
rsync -a /context/. .
43+
rm -rf dist
44+
yarn run build
45+
mkdir /out
46+
cp -r dist /out
47+
EOT
4148

4249
FROM scratch AS build-update
4350
COPY --from=build /out /
4451

4552
FROM build AS build-validate
46-
RUN --mount=type=bind,target=.,rw <<EOT
53+
RUN --mount=target=/context \
54+
--mount=target=.,type=tmpfs <<EOT
4755
set -e
56+
rsync -a /context/. .
4857
git add -A
58+
rm -rf dist
4959
cp -rf /out/* .
5060
if [ -n "$(git status --porcelain -- dist)" ]; then
5161
echo >&2 'ERROR: Build result differs. Please build first with "docker buildx bake build"'
@@ -56,9 +66,9 @@ EOT
5666

5767
FROM deps AS format
5868
RUN --mount=type=bind,target=.,rw \
69+
--mount=type=cache,target=/src/.yarn/cache \
5970
--mount=type=cache,target=/src/node_modules \
60-
yarn run format \
61-
&& mkdir /out && find . -name '*.ts' -not -path './node_modules/*' -not -path './.yarn/*' | cpio -pdm /out
71+
yarn run format && mkdir /out && find . -name '*.ts' -not -path './node_modules/*' -not -path './.yarn/*' | cpio -pdm /out
6272

6373
FROM scratch AS format-update
6474
COPY --from=format /out /

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/package.json

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/sourcemap-register.cjs

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/sourcemap-register.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)