Skip to content

Commit 1519969

Browse files
authored
Merge pull request #100 from codecrafters-io/andy/upgrade-bun-to-v1.3-no-2
CC-2145: Upgrade Bun to v1.3
2 parents 6389293 + 2ee4f64 commit 1519969

File tree

14 files changed

+95
-12
lines changed

14 files changed

+95
-12
lines changed

compiled_starters/typescript/.codecrafters/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88

99
set -e # Exit on failure
1010

11-
exec bun run $(dirname $0)/app/main.ts "$@"
11+
exec bun run "$(dirname "$0")/app/main.ts" "$@"

compiled_starters/typescript/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ That's all!
2727

2828
Note: This section is for stages 2 and beyond.
2929

30-
1. Ensure you have `bun (1.2)` installed locally
30+
1. Ensure you have `bun (1.3)` installed locally
3131
1. Run `./your_program.sh` to run your Kafka broker, which is implemented in
3232
`app/main.ts`.
3333
1. Commit your changes and run `git push origin master` to submit your solution

compiled_starters/typescript/bun.lock

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

compiled_starters/typescript/codecrafters.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ debug: false
77
# Use this to change the TypeScript version used to run your code
88
# on Codecrafters.
99
#
10-
# Available versions: bun-1.2
11-
buildpack: bun-1.2
10+
# Available versions: bun-1.3
11+
buildpack: bun-1.3

compiled_starters/typescript/your_program.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ set -e # Exit early if any commands fail
1212
#
1313
# - Edit this to change how your program runs locally
1414
# - Edit .codecrafters/run.sh to change how your program runs remotely
15-
exec bun run $(dirname $0)/app/main.ts "$@"
15+
exec bun run "$(dirname "$0")/app/main.ts" "$@"

dockerfiles/bun-1.3.Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# syntax=docker/dockerfile:1.7-labs
2+
FROM oven/bun:1.3-alpine
3+
4+
ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="package.json,bun.lock"
5+
6+
RUN apk add --no-cache --upgrade 'bash>=5.2'
7+
8+
WORKDIR /app
9+
10+
# .git & README.md are unique per-repository. We ignore them on first copy to prevent cache misses
11+
COPY --exclude=.git --exclude=README.md . /app
12+
13+
# For reproducible builds.
14+
# This will install the exact versions of each package specified in the lockfile.
15+
# If package.json disagrees with bun.lockb, Bun will exit with an error. The lockfile will not be updated.
16+
RUN bun install --frozen-lockfile
17+
18+
# If the node_modules directory exists, move it to /app-cached
19+
RUN mkdir -p /app-cached
20+
RUN if [ -d "/app/node_modules" ]; then mv /app/node_modules /app-cached; fi

solutions/typescript/01-vi6/code/.codecrafters/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88

99
set -e # Exit on failure
1010

11-
exec bun run $(dirname $0)/app/main.ts "$@"
11+
exec bun run "$(dirname "$0")/app/main.ts" "$@"

solutions/typescript/01-vi6/code/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ That's all!
2727

2828
Note: This section is for stages 2 and beyond.
2929

30-
1. Ensure you have `bun (1.2)` installed locally
30+
1. Ensure you have `bun (1.3)` installed locally
3131
1. Run `./your_program.sh` to run your Kafka broker, which is implemented in
3232
`app/main.ts`.
3333
1. Commit your changes and run `git push origin master` to submit your solution

solutions/typescript/01-vi6/code/bun.lock

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

solutions/typescript/01-vi6/code/codecrafters.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ debug: false
77
# Use this to change the TypeScript version used to run your code
88
# on Codecrafters.
99
#
10-
# Available versions: bun-1.2
11-
buildpack: bun-1.2
10+
# Available versions: bun-1.3
11+
buildpack: bun-1.3

0 commit comments

Comments
 (0)