Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
bcdaae1
chore: replace yarn and node with bun
TurtIeSocks Aug 23, 2026
74e3c8c
fix: stop eslint escaping the worktree, and let it see bun:test
TurtIeSocks Aug 23, 2026
26a933b
test: migrate from node:test to bun:test
TurtIeSocks Aug 23, 2026
130405a
fix: declare Bun as a global for eslint
TurtIeSocks Aug 23, 2026
2a6efc3
feat!: replace bcrypt with Bun.password
TurtIeSocks Aug 23, 2026
739e10d
refactor: use the native fetch instead of node-fetch
TurtIeSocks Aug 23, 2026
6200b00
fix: verify legacy bcrypt hashes of passwords over 72 bytes
TurtIeSocks Aug 23, 2026
cadb424
docs: goals 16 through 25
TurtIeSocks Aug 23, 2026
e993571
chore: replace eslint and prettier with biome
TurtIeSocks Aug 24, 2026
3636dcd
docs: scope the entitlement api to exclude payment handling
TurtIeSocks Aug 24, 2026
3dc222f
fix: remove unused @ts-expect-error directives
TurtIeSocks Aug 24, 2026
fd47aa6
build: strict typescript config and a typecheck gate
TurtIeSocks Aug 24, 2026
5713770
docs: record the 612 latent type errors
TurtIeSocks Aug 24, 2026
82f2465
feat: scaffold the 2.0 client entry with tailwind v4
TurtIeSocks Aug 24, 2026
9570a7c
fix: give the app entry CSS its own chunk
TurtIeSocks Aug 24, 2026
62058d0
feat!: remove the .custom.jsx build-time override plugin
TurtIeSocks Aug 24, 2026
36d900e
fix(server): restore this.query on static model methods
TurtIeSocks Aug 24, 2026
53bffad
fix(auth): stop rewriting the stored hash on a legacy verify
TurtIeSocks Aug 24, 2026
4b6eab4
ci: move the remaining four workflows to bun
TurtIeSocks Aug 24, 2026
bacecd6
fix(auth): return false for a malformed stored hash
TurtIeSocks Aug 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 0 additions & 9 deletions .eslintignore

This file was deleted.

92 changes: 0 additions & 92 deletions .eslintrc

This file was deleted.

13 changes: 7 additions & 6 deletions .github/workflows/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@ jobs:
uses: actions/checkout@v4.1.1
with:
fetch-depth: 2
- name: Setup Node.js environment
uses: actions/setup-node@v4.0.2
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
node-version: 22.23.1
cache: yarn
bun-version: 1.3.11
- name: Install Dependencies
run: bun install --frozen-lockfile
- name: Run script
run: yarn config:check
run: bun run config:check
- name: Generate latest env vars
run: yarn config:env
run: bun run config:env
- name: Configure git
run: |
git config --global user.name "turtlesocks-bot"
Expand Down
23 changes: 11 additions & 12 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,25 @@ jobs:
uses: actions/checkout@v4.1.1
with:
fetch-depth: 2
- name: Setup Node.js environment
uses: actions/setup-node@v4.0.2
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
node-version: 22.23.1
cache: yarn
bun-version: 1.3.11

- name: Install Dependencies
run: yarn
run: bun install --frozen-lockfile

- name: Masterfile
run: yarn masterfile
run: bun run masterfile

- name: Test
run: yarn test
run: bun run test

- name: Lint
run: yarn lint
- name: Typecheck
run: bun run typecheck

- name: Prettier
run: yarn prettier
- name: Lint
run: bun run lint

- name: Build
run: yarn build
run: bun run build
11 changes: 5 additions & 6 deletions .github/workflows/locales.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,14 @@ jobs:
uses: actions/checkout@v4.1.1
with:
fetch-depth: 0
- name: Setup Node.js environment
uses: actions/setup-node@v4.0.2
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
node-version: 22.23.1
cache: yarn
bun-version: 1.3.11
- name: Install dependencies
run: yarn
run: bun install --frozen-lockfile
- name: Run generating script
run: yarn locales:generate
run: bun run locales:generate
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
- name: Configure git
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
branches:
- main
- develop
- v2

jobs:
lint:
Expand Down
19 changes: 8 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,25 @@ jobs:
uses: actions/checkout@v4.1.1
with:
fetch-depth: 0
- name: Setup Node.js environment
uses: actions/setup-node@v4.0.2
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
node-version: 22.23.1
cache: yarn
bun-version: 1.3.11
- name: Echo versions
run: |
node --version
yarn --version
run: bun --version
- name: Install dependencies
run: yarn --prefer-offline
run: bun install --frozen-lockfile
env:
HUSKY: 0
- name: Lint app
run: yarn lint
run: bun run lint
- name: Build app
run: yarn build
run: bun run build
- name: Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HUSKY: 0
run: npx semantic-release
run: bunx semantic-release
- name: Configure git
if: ${{ github.ref_name == 'main'}}
run: |
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/sentry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,16 @@ jobs:
uses: actions/checkout@v4.1.1
with:
fetch-depth: 2
- name: Setup Node.js environment
uses: actions/setup-node@v4.0.2
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
node-version: 22.23.1
cache: yarn
bun-version: 1.3.11

- name: Install Dependencies
run: yarn
run: bun install --frozen-lockfile

- name: Sentry Build
run: yarn release
run: bun run release
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
Expand Down
3 changes: 2 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged --verbose
bunx biome check --staged --no-errors-on-unmatched
bun run typecheck
8 changes: 0 additions & 8 deletions .prettierignore

This file was deleted.

5 changes: 0 additions & 5 deletions .prettierrc

This file was deleted.

3 changes: 1 addition & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"recommendations": [
"streetsidesoftware.code-spell-checker",
"dbaeumer.vscode-eslint",
"biomejs.biome",
"lokalise.i18n-ally",
"esbenp.prettier-vscode",
"christian-kohler.npm-intellisense",
"graphql.vscode-graphql"
]
Expand Down
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
"i18n-ally.keystyle": "flat",
"[javascript]": {
"editor.autoClosingBrackets": "always",
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "biomejs.biome"
},
"[javascriptreact]": {
"editor.autoClosingBrackets": "always",
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "biomejs.biome"
},
"editor.formatOnSave": true,
"typescript.tsdk": "node_modules/typescript/lib"
Expand Down
21 changes: 9 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
## Simple Dockerfile to build ReactMap (main branch)
## Simple Dockerfile to build ReactMap (v2 branch)
# - Inside the container, the content of this git repo lives in /home/node/
## You have to mount your configs into the container:
# - mount local.json to /home/node/server/src/configs/local.json
# - mount areas.json to /home/node/server/src/configs/areas.json
# - Also mount every other configuration file necessary into the according directory.

FROM node:22.23.1-alpine

ENV NPM_CONFIG_PREFIX=/home/node/.npm-global
ENV PATH=$PATH:/home/node/.npm-global/bin
FROM oven/bun:1.3.11-alpine

WORKDIR /home/node
COPY package.json .
COPY yarn.lock .
RUN apk add git
RUN npm install -g yarn

RUN apk add --no-cache git

COPY . .
RUN yarn install
RUN yarn build
RUN bun install --frozen-lockfile
RUN bun run build

CMD ["bun", "."]
12 changes: 12 additions & 0 deletions app.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>ReactMap</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/app/main.tsx"></script>
</body>
</html>
7 changes: 7 additions & 0 deletions app/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export function App() {
return (
<main className="grid min-h-dvh place-items-center bg-white font-sans">
<p className="text-lg text-neutral-500">ReactMap 2.0</p>
</main>
)
}
45 changes: 45 additions & 0 deletions app/build.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import { expect, test } from 'bun:test'
import { resolve } from 'path'

// Asserting on the Vite config rather than dist/ artifacts: CI runs the
// test step before the build step (fresh checkout, no dist/), so a test
// that stats dist/index.html and dist/app.html would fail red in CI even
// on a correct build. The build itself is still proven end to end by the
// CI Build step, which fails if either entry breaks.
async function loadRollupInput() {
const viteConfigModule = require('../vite.config.js')
const resolved =
typeof viteConfigModule === 'function'
? viteConfigModule
: viteConfigModule.default
const config = await resolved({ mode: 'production', command: 'build' })
return config.build.rollupOptions.input as Record<string, string>
}

test('the vite config keeps the 1.0 entry', async () => {
const input = await loadRollupInput()
expect(input.main).toContain('index.html')
})

test('the vite config adds the 2.0 entry', async () => {
const input = await loadRollupInput()
expect(input.app).toContain('app.html')
})

test('the app entry CSS gets its own chunk, separate from the 1.0 CSS', async () => {
const viteConfigModule = require('../vite.config.js')
const resolved =
typeof viteConfigModule === 'function'
? viteConfigModule
: viteConfigModule.default
const config = await resolved({ mode: 'production', command: 'build' })
const { manualChunks } = config.build.rollupOptions.output
const appCssId = resolve(__dirname, '../app/styles.css')
const legacyCssId = resolve(__dirname, '../src/assets/css/main.css')

const appChunk = manualChunks(appCssId)
const legacyChunk = manualChunks(legacyCssId)

expect(appChunk).not.toBe(legacyChunk)
expect(legacyChunk).toBe('index')
})
Loading
Loading