Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch"
}
}
8 changes: 8 additions & 0 deletions .changeset/migrate-journeyapps-scope.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@journeyapps/micro-codecs': patch
'@journeyapps/micro-errors': patch
'@journeyapps/micro-schema': patch
'@journeyapps/micro-streaming': patch
---

Publish Micro packages under the `@journeyapps` scope after moving the repository to the JourneyApps GitHub organization.
32 changes: 32 additions & 0 deletions .github/actions/setup-node-pnpm/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Setup Node and pnpm
description: Setup Node, pnpm, pnpm cache, and install dependencies.

runs:
using: composite
steps:
- name: Setup NodeJS
uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'

- uses: pnpm/action-setup@v6
name: Install pnpm
with:
run_install: false

- name: Get pnpm store directory
shell: bash
run: echo "STORE_PATH=$(pnpm store path --silent)" >> "$GITHUB_ENV"

- uses: actions/cache@v5
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
shell: bash
run: pnpm install
45 changes: 0 additions & 45 deletions .github/workflows/build-and-test.yaml.yml

This file was deleted.

51 changes: 0 additions & 51 deletions .github/workflows/changesets.yaml.yml

This file was deleted.

53 changes: 0 additions & 53 deletions .github/workflows/dev-packages.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions .github/workflows/prettier.yaml.yml

This file was deleted.

55 changes: 55 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Release

on:
push:
branches:
- main
workflow_dispatch:

concurrency: ${{ github.workflow }}-${{ github.ref }}

permissions:
id-token: write
contents: write
pull-requests: write

jobs:
release:
name: Release
runs-on: ubuntu-latest
environment: npm
steps:
- name: Checkout Repo
uses: actions/checkout@v6

- name: Setup Node and pnpm
uses: ./.github/actions/setup-node-pnpm

- name: Update npm
run: |
npm install -g npm@12
npm --version

- name: Build
run: pnpm build

- name: Dev Publish
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
pnpm changeset version --no-git-tag --snapshot dev
pnpm changeset publish --tag dev
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: 'true'

- name: Prod Create Release Pull Request or Publish
if: ${{ github.event_name == 'push' }}
uses: changesets/action@v1.9.0
id: changesets
with:
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: 'true'
24 changes: 24 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Test

on:
pull_request:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false

- name: Setup Node and pnpm
uses: ./.github/actions/setup-node-pnpm

- name: Prettier check
run: pnpm exec prettier --check --ignore-path .prettierignore --config .prettierrc '**/*.{ts,tsx,js,jsx}'

- name: Build
run: pnpm build

- name: Test
run: pnpm test
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20.15
24
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# JourneyApps Labs Micro
# JourneyApps Micro

Micro-service framework
Shared codecs, errors, schema validation, and streaming utilities used by JourneyApps services.

## Release

The initial publish under the `@journeyapps` scope requires an `NPM_TOKEN` secret in the `npm` GitHub environment. After every package has been published once, configure npm trusted publishing for this repository and `.github/workflows/release.yml`, then remove the `NODE_AUTH_TOKEN` entries from the workflow and the `NPM_TOKEN` secret.

### Dev release

1. Ensure a changeset has been created `pnpm changeset`
2. Run https://github.com/journeyapps-labs/common/actions/workflows/dev-packages.yaml the workflow manually on the branch you need
2. Run https://github.com/journeyapps/micro/actions/workflows/release.yml manually on the branch you need

### Production release

1. Ensure a changeset has been created `pnpm changeset`
2. Merge PR and then merge the versions PR which gets created.
2. Merge PR and then merge the versions PR which gets created.
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "micro",
"private": "true",
"packageManager": "pnpm@10.18.1",
"private": true,
"packageManager": "pnpm@11.17.0",
"scripts": {
"preinstall": "npx only-allow pnpm",
"format": "prettier --write \"**/*.{ts,tsx,js,jsx}\"",
Expand All @@ -11,9 +11,10 @@
"ncu": "ncu -u && pnpm recursive exec -- ncu -u"
},
"devDependencies": {
"@changesets/cli": "^2.29.7",
"npm-check-updates": "^19.0.0",
"prettier": "3.6.2",
"typescript": "^5.9.3"
"@changesets/cli": "^2.31.1",
"@types/node": "^26.1.2",
"npm-check-updates": "^23.0.0",
"prettier": "3.9.6",
"typescript": "^7.0.2"
}
}
}
2 changes: 1 addition & 1 deletion packages/codecs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @journeyapps-labs/micro-codecs
# @journeyapps/micro-codecs

## 1.0.3

Expand Down
8 changes: 4 additions & 4 deletions packages/codecs/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@journeyapps-labs/micro-codecs",
"name": "@journeyapps/micro-codecs",
"main": "./dist/index",
"typings": "./dist/index",
"version": "1.0.3",
Expand All @@ -9,7 +9,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/journeyapps-labs/micro.git"
"url": "https://github.com/journeyapps/micro.git"
},
"author": "JOURNEYAPPS",
"license": "Apache-2.0",
Expand All @@ -20,11 +20,11 @@
"test": "vitest"
},
"dependencies": {
"@types/node": "^24.7.0",
"@types/node": "^26.1.2",
"bson": "^6.10.4",
"ts-codec": "^1.3.0"
},
"devDependencies": {
"vitest": "^3.2.4"
"vitest": "^4.1.10"
}
}
2 changes: 1 addition & 1 deletion packages/errors/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @journeyapps-labs/micro-errors
# @journeyapps/micro-errors

## 1.0.1

Expand Down
Loading