Skip to content

Commit 4802199

Browse files
committed
Migrate from npm to Bun
- Switch Dockerfile from node:18.20 to oven/bun:1.1 - Update CI validate_feeds job to use Bun image - Replace package-lock.json with bun.lock - Update package.json scripts to use bun commands - Update validate-feeds.sh to use bun run
1 parent bb1d352 commit 4802199

7 files changed

Lines changed: 4017 additions & 25968 deletions

File tree

.ci/validate-feeds.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
set -e
55

66
echo "Building site to generate feeds..."
7-
npm run build
7+
bun run build
88

99
echo ""
1010
echo "Validating RSS/Atom feeds..."

.gitlab-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ variables:
2424
# Validate RSS/Atom feeds before building and deploying
2525
validate_feeds:
2626
stage: validate
27-
image: node:18
27+
image: oven/bun:1.1
2828
before_script:
2929
# Install xmllint for XML validation
3030
- apt-get update && apt-get install -y libxml2-utils jq
31-
- npm ci
31+
- bun install --frozen-lockfile
3232
script:
3333
- bash .ci/validate-feeds.sh
3434
artifacts:

Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:18.20
1+
FROM oven/bun:1.1
22

33
ARG ARG_REACT_APP_API_SERVER
44
ENV REACT_APP_API_SERVER=$ARG_REACT_APP_API_SERVER
@@ -27,14 +27,14 @@ ENV UMAMI_SCRIPT_URL=$ARG_UMAMI_SCRIPT_URL
2727
WORKDIR /docs
2828

2929
COPY package.json ./
30-
COPY package-lock.json ./
31-
RUN npm ci
30+
COPY bun.lock ./
31+
RUN bun install --frozen-lockfile
3232

3333
COPY . .
3434
# Make cache folder if not exists.
3535
RUN mkdir -p .cache
3636
RUN mv .cache node_modules
37-
RUN npm run build
37+
RUN bun run build
3838

3939
EXPOSE 3000
40-
CMD ["npm", "run", "serve"]
40+
CMD ["bun", "run", "serve"]

bun.lock

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

docusaurus.config.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,21 @@ module.exports = {
387387
clientModules: [],
388388

389389
plugins: [
390+
// Fix cytoscape module resolution for mermaid
391+
function () {
392+
return {
393+
name: 'webpack-cytoscape-fix',
394+
configureWebpack() {
395+
return {
396+
resolve: {
397+
alias: {
398+
'cytoscape/dist/cytoscape.umd.js': require.resolve('cytoscape'),
399+
},
400+
},
401+
};
402+
},
403+
};
404+
},
390405
[
391406
'@docusaurus/plugin-ideal-image',
392407
{

0 commit comments

Comments
 (0)