Skip to content

Commit 901c06c

Browse files
authored
Merge pull request #1 from ickb/feat/monorepo
Minimal monorepo integration
2 parents 448847d + 7af5300 commit 901c06c

File tree

141 files changed

+4995
-16290
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+4995
-16290
lines changed

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@3.0.2/schema.json",
3+
"changelog": ["@changesets/changelog-github", { "repo": "ickb/stack" }],
4+
"prettier": false,
5+
"commit": false,
6+
"fixed": [],
7+
"linked": [],
8+
"access": "public",
9+
"baseBranch": "master",
10+
"updateInternalDependencies": "patch",
11+
"ignore": []
12+
}

.devcontainer/devcontainer.json

Lines changed: 46 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,65 @@
1-
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2-
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
1+
// Instructions to use this devcontainer:
2+
// 0. Make sure Docker or Podman is running.
3+
// 1. Install the VS Code extension "Dev Containers" (ms-vscode-remote.remote-containers).
4+
// 2. Open the Command Palette (Shift+Ctrl+P / Shift+Cmd+P) and run "Dev Containers: Reopen in Container",
5+
// alternatively "Dev Containers: Open Folder in Container".
6+
// 3. When finished, run "Dev Containers: Close Remote Connection" from the Command Palette to stop the container.
7+
// 4. To reclaim disk space, remove the stopped container/image with Docker/Podman,
8+
// the container can be recreated from this config when needed.
39
{
4-
"name": "Node.js & TypeScript",
5-
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6-
"image": "mcr.microsoft.com/devcontainers/typescript-node",
10+
// Display name shown by editor when selecting this dev container
11+
"name": "iCKB Dev Environment",
12+
13+
// Base image from Microsoft devcontainers for a TypeScript + Node environment
14+
"image": "mcr.microsoft.com/devcontainers/typescript-node:24",
15+
16+
// Persisted volumes to speed installs and avoid repeated network requests
717
"mounts": [
8-
"source=ickb-${localWorkspaceFolderBasename}-node_modules,target=${containerWorkspaceFolder}/node_modules,type=volume",
9-
"source=ickb-${localWorkspaceFolderBasename}-dist,target=${containerWorkspaceFolder}/dist,type=volume",
10-
"source=pnpm-cache,target=${containerWorkspaceFolder}/.pnpm-store,type=volume",
11-
"source=local-store,target=${containerWorkspaceFolder}/.local-store,type=volume",
12-
"source=gemini-code-assist,target=/home/node/.cache/google-vscode-extension,type=volume"
18+
// Share a pnpm store cache volume to speed package resolution and install times across projects/containers
19+
"source=pnpm-cache,target=${containerWorkspaceFolder}/.pnpm-store,type=volume"
1320
],
14-
// Features to add to the dev container. More info: https://containers.dev/features.
15-
// "features": {},
16-
// Use 'forwardPorts' to make a list of ports inside the container available locally.
17-
// "forwardPorts": [],
18-
// Use 'postCreateCommand' to run commands after the container is created.
19-
"postCreateCommand": "sudo chown node -R . /home && npm install -g pnpm@latest",
20-
// Configure tool-specific properties.
21-
// "customizations": {},
22-
"postStartCommand": "pnpm install",
21+
22+
// Run once after the container filesystem is created.
23+
// - Fix ownership so the non-root node user can access workspace files
24+
// - Install latest pnpm globally so postStartCommand and developer workflows use pnpm
25+
"postCreateCommand": "sudo corepack enable && sudo chown -R node:node /home/node ${containerWorkspaceFolder}",
26+
27+
// Run each time the container starts. Ensures dependencies are installed inside the container user environment.
28+
"postStartCommand": "pnpm install --frozen-lockfile",
29+
30+
// Use the non-root 'node' user provided by the base image for safer file access and to mirror deployment permissions
2331
"remoteUser": "node",
32+
2433
"customizations": {
25-
// Configure properties specific to VS Code.
2634
"vscode": {
27-
// Set *default* container specific settings.json values on container create.
35+
// Recommended and enforced editor settings for consistent linting/validation across contributors
2836
"settings": {
37+
// Prefer editor config over global formatting where appropriate
38+
"editor.formatOnSave": true,
39+
"editor.codeActionsOnSave": {
40+
"source.fixAll.eslint": "explicit"
41+
},
2942
"eslint.validate": [
3043
"json",
3144
"javascript",
3245
"javascriptreact",
3346
"typescript",
3447
"typescriptreact"
3548
],
36-
"geminicodeassist.chat.enableStreaming": false,
37-
"geminicodeassist.enableTelemetry": false,
38-
"geminicodeassist.inlineSuggestions.suggestionSpeed": "Fast",
39-
"geminicodeassist.localCodebaseAwareness": false,
40-
"geminicodeassist.rules": "As a terse, expert peer, be correct. Code only when most direct."
49+
// Disable telemetry to avoid sending usage data to Microsoft
50+
"telemetry.enableTelemetry": false
4151
},
52+
53+
// Recommended extensions preinstalled in the container to provide a consistent developer experience
4254
"extensions": [
43-
"streetsidesoftware.code-spell-checker",
44-
"dbaeumer.vscode-eslint",
45-
"esbenp.prettier-vscode",
46-
"yoavbls.pretty-ts-errors",
47-
"davidanson.vscode-markdownlint",
48-
"github.vscode-github-actions",
49-
"google.geminicodeassist"
55+
"streetsidesoftware.code-spell-checker", // basic spell checking in docs/comments
56+
"bradlc.vscode-tailwindcss", // Tailwind CSS IntelliSense if project uses Tailwind
57+
"dbaeumer.vscode-eslint", // ESLint integration for linting and autofix
58+
"esbenp.prettier-vscode", // Prettier for consistent formatting
59+
"yoavbls.pretty-ts-errors", // Improved TypeScript error messages
60+
"davidanson.vscode-markdownlint", // Markdown linting for docs
61+
"github.vscode-github-actions", // GitHub Actions workflow support
62+
"github.vscode-pull-request-github" // PR and issue integration with GitHub
5063
]
5164
}
5265
}

.devcontainer/setup-local-store.sh

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

.github/pull_request_template.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<!-- Thank you for your contribution! -->
2+
3+
- [ ] I have read the [**Contributing Guidelines**](CONTRIBUTING.md)

.github/workflows/check.yaml

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,23 @@
1-
name: Lint and build
1+
name: Build, lint and test
22

33
on: [pull_request, push]
44

55
jobs:
66
build:
7-
name: Build
87
runs-on: ubuntu-latest
98

109
steps:
11-
- name: Checkout repo
12-
uses: actions/checkout@v4
13-
14-
- name: Install pnpm
15-
uses: pnpm/action-setup@v4
16-
with:
17-
version: 10
18-
run_install: false
19-
20-
- name: Setup Node
21-
uses: actions/setup-node@v4
10+
- uses: actions/checkout@v4
11+
- uses: actions/setup-node@v4
2212
with:
23-
node-version: "lts/*"
24-
registry-url: "https://registry.npmjs.org"
25-
cache: "pnpm"
13+
node-version: 24
14+
- uses: pnpm/action-setup@v4
2615

27-
- name: Install dependencies and configure
16+
- name: Install dependencies
2817
run: pnpm install
29-
30-
- name: Lint project
18+
- name: Build
19+
run: pnpm build:all
20+
- name: Lint
3121
run: pnpm lint
22+
# - name: Test
23+
# run: pnpm test:ci

.github/workflows/publish.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Release to NPM
2+
3+
permissions:
4+
pull-requests: write
5+
contents: write
6+
7+
on:
8+
push:
9+
branches:
10+
- release
11+
- "releases/**"
12+
13+
concurrency: ${{ github.workflow }}-${{ github.ref }}
14+
15+
jobs:
16+
release:
17+
name: Release
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: actions/setup-node@v4
22+
with:
23+
node-version: 24
24+
- uses: pnpm/action-setup@v4
25+
26+
- name: Install dependencies
27+
run: pnpm build:prepare
28+
- name: Build
29+
run: pnpm build
30+
31+
- name: Create Release Pull Request or Publish to npm
32+
id: changesets
33+
uses: changesets/action@v1
34+
with:
35+
title: ${{ format('chore({0}){1} bump packages version', github.ref_name, ':') }}
36+
commit: ${{ format('chore({0}){1} bump packages version', github.ref_name, ':') }}
37+
version: pnpm run version
38+
publish: pnpm changeset publish
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/publish.yml

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

.gitignore

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,6 @@
1-
# Logs
2-
log_*.json
3-
logs
4-
*.log
5-
npm-debug.log*
6-
yarn-debug.log*
7-
yarn-error.log*
8-
pnpm-debug.log*
9-
lerna-debug.log*
10-
11-
# Artifacts
12-
node_modules
13-
dist
14-
dist-ssr
15-
*.local
16-
.pnpm-store
17-
.local-store
18-
19-
# Editor directories and files
20-
.vscode/*
21-
!.vscode/extensions.json
22-
.idea
23-
.DS_Store
24-
*.suo
25-
*.ntvs*
26-
*.njsproj
27-
*.sln
28-
*.sw?
1+
# Dependencies
2+
**/node_modules/
3+
.pnpm-store/
4+
5+
# Artifacts
6+
**/dist/

0 commit comments

Comments
 (0)