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
9 changes: 9 additions & 0 deletions .changeset/migrate-to-structurer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@platforma-open/milaboratories.3d-structure-based-liabilities.model': patch
'@platforma-open/milaboratories.3d-structure-based-liabilities.ui': patch
'@platforma-open/milaboratories.3d-structure-based-liabilities.workflow': patch
'@platforma-open/milaboratories.3d-structure-based-liabilities.software': patch
'@platforma-open/milaboratories.3d-structure-based-liabilities': patch
---

Migrate block onto the structurer (block-tools `structure refresh`) and upgrade the SDK toolchain. Tool-managed layout now owns tsconfig, oxlint/oxfmt, turbo, the block index, and per-package deps. Catalog bumped to block-tools 2.11.0, workflow-tengo 6.6.3, model/ui-vue/test 1.79.14, tengo-builder 4.0.8.
22 changes: 6 additions & 16 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,55 +11,45 @@ on:
workflow_dispatch: {}
jobs:
init:
if: github.repository != 'milaboratory/platforma-hello-world'
runs-on: ubuntu-latest
steps:
- uses: milaboratory/github-ci/actions/context/init@v4
with:
version-canonize: false
branch-versioning: main
run:
if: github.repository != 'milaboratory/platforma-hello-world'
needs:
- init

uses: milaboratory/github-ci/.github/workflows/node-simple-pnpm.yaml@v4
with:
app-name: 'Block: 3D Structure-Based Liabilities'
app-name: 'Block: 3d Structure-Based Liabilities'
app-name-slug: 'block-3d-structure-based-liabilities'

node-version: '20.x'
build-script-name: 'build'
pnpm-recursive-build: false

test: false
test: true
test-script-name: 'test'
pnpm-recursive-tests: false
team-id: 'ciplopen'

publish-to-public: 'true'
package-path: 'block'
publish-to-public: true
create-tag: true
create-tag: 'true'

npmrc-config: |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 App name case change may break tracking integrations

'Block: 3D Structure-Based Liabilities' was changed to 'Block: 3d Structure-Based Liabilities' (lowercase d). The same inconsistency appears in mark-stable.yaml, where the name also loses its hyphens: 'Block: 3d Structure Based Liabilities - Mark Stable'. If this app-name is used to key dashboards, Slack notifications, or release tracking in the CI system, both workflows should use the same casing, and any existing references to the original name will no longer match.

Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/build.yaml
Line: 40

Comment:
**App name case change may break tracking integrations**

`'Block: 3D Structure-Based Liabilities'` was changed to `'Block: 3d Structure-Based Liabilities'` (lowercase `d`). The same inconsistency appears in `mark-stable.yaml`, where the name also loses its hyphens: `'Block: 3d Structure Based Liabilities - Mark Stable'`. If this `app-name` is used to key dashboards, Slack notifications, or release tracking in the CI system, both workflows should use the same casing, and any existing references to the original name will no longer match.

How can I resolve this? If you propose a fix, please make it concise.

Fix in Claude Code

{
"registries": {
"https://registry.npmjs.org/": {
"scopes": ["milaboratories", "platforma-open", "platforma-sdk"],
"scopes": ["milaboratories", "platforma-sdk", "platforma-open"],
"tokenVar": "NPMJS_TOKEN"
},
"https://npm.pkg.github.com/": {
"scopes": ["milaboratory"],
"tokenVar": "NODE_AUTH_TOKEN"
}
}
}

secrets:
env: |
{ "PL_LICENSE": ${{ toJSON(secrets.MI_LICENSE) }},
"MI_LICENSE": ${{ toJSON(secrets.MI_LICENSE) }},

"NPMJS_TOKEN": ${{ toJSON(secrets.NPMJS_TOKEN) }},
"PL_CI_TEST_USER": ${{ toJSON(secrets.PL_CI_TEST_USER) }},
"PL_CI_TEST_PASSWORD": ${{ toJSON(secrets.PL_CI_TEST_PASSWORD) }},
Expand All @@ -70,8 +60,8 @@ jobs:
"QUAY_USERNAME": ${{ toJSON(secrets.QUAY_USERNAME) }},
"QUAY_ROBOT_TOKEN": ${{ toJSON(secrets.QUAY_ROBOT_TOKEN) }} }

SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_CHANNEL: ${{ secrets.SLACK_BLOCKS_CI_CHANNEL }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

GH_ZEN_APP_ID: ${{ secrets.GH_ZEN_APP_ID }}
GH_ZEN_APP_PRIVATE_KEY: ${{ secrets.GH_ZEN_APP_PRIVATE_KEY }}
6 changes: 2 additions & 4 deletions .github/workflows/mark-stable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,18 @@ on:
workflow_dispatch: {}
jobs:
init:
if: github.repository != 'milaboratory/platforma-hello-world'
runs-on: ubuntu-latest
steps:
- uses: milaboratory/github-ci/actions/context/init@v4
with:
version-canonize: false
branch-versioning: main
run:
if: github.repository != 'milaboratory/platforma-hello-world'
needs:
- init
uses: milaboratory/github-ci/.github/workflows/block-mark-stable.yaml@v4
with:
app-name: 'Block: 3D Structure-Based Liabilities - Mark Stable'
app-name: 'Block: 3d Structure Based Liabilities - Mark Stable'
node-version: '20.x'
npmrc-config: |
{
Expand All @@ -32,5 +30,5 @@ jobs:
{ "NPMJS_TOKEN": ${{ toJSON(secrets.NPMJS_TOKEN) }},
"AWS_CI_IAM_MONOREPO_SIMPLE_ROLE": ${{ toJSON(secrets.AWS_CI_IAM_MONOREPO_SIMPLE_ROLE) }} }

SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_CHANNEL: ${{ secrets.SLACK_BLOCKS_CI_CHANNEL }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
7 changes: 0 additions & 7 deletions .prettierrc

This file was deleted.

1 change: 1 addition & 0 deletions .structure
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"version":1}
50 changes: 1 addition & 49 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,51 +1,3 @@
{
"vitest.disableWorkspaceWarning": true,
"editor.defaultFormatter": "oxc.oxc-vscode",
"[typescript]": {
"editor.defaultFormatter": "oxc.oxc-vscode",
"editor.tabSize": 2
},
"[vue]": {
"editor.defaultFormatter": "oxc.oxc-vscode",
"editor.tabSize": 2
},
"cSpell.words": [
"datasource",
"pframe",
"prerun"
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "always"
},
"eslint.enable": true,
"eslint.format.enable": true,
"[javascript]": {
"editor.defaultFormatter": "oxc.oxc-vscode",
"editor.tabSize": 2
},
"[css]": {
"editor.defaultFormatter": "oxc.oxc-vscode",
"editor.tabSize": 2
},
"[scss]": {
"editor.defaultFormatter": "oxc.oxc-vscode",
"editor.tabSize": 2
},
"[html]": {
"editor.defaultFormatter": "oxc.oxc-vscode",
"editor.tabSize": 2
},
"[yaml]": {
"editor.defaultFormatter": "oxc.oxc-vscode",
"editor.tabSize": 2
},
"[markdown]": {
"editor.defaultFormatter": "oxc.oxc-vscode",
"editor.tabSize": 2
},
"[json]": {
"editor.defaultFormatter": "oxc.oxc-vscode",
"editor.tabSize": 2
},
"typescript.tsdk": "./node_modules/typescript/lib"
"typescript.tsdk": "node_modules/typescript/lib"
}
6 changes: 6 additions & 0 deletions block/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
declare const blockSpec: {
type: "dev-v2";
folder: string;
};

export { blockSpec };
8 changes: 8 additions & 0 deletions block/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const blockSpec = {
type: "dev-v2",
folder: __dirname,
};

module.exports = {
blockSpec,
};
28 changes: 15 additions & 13 deletions block/package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
{
"name": "@platforma-open/milaboratories.3d-structure-based-liabilities",
"version": "1.2.6",
"scripts": {
"build": "shx rm -rf ./block-pack && block-tools pack",
"prepublishOnly": "block-tools pack && block-tools publish -r 's3://milab-euce1-prod-pkgs-s3-block-registry/pub/releases/?region=eu-central-1'",
"do-pack": "shx rm -f *.tgz && block-tools pack && pnpm pack && shx mv *.tgz package.tgz"
},
"files": [
"index.d.ts",
"index.js"
],
"scripts": {
"build": "shx rm -rf ./block-pack && block-tools pack",
"prepublishOnly": "block-tools pack && block-tools publish -r 's3://milab-euce1-prod-pkgs-s3-block-registry/pub/releases/?region=eu-central-1'",
"do-pack": "shx rm -f *.tgz && block-tools pack && pnpm pack && shx mv *.tgz package.tgz",
"mark-stable": "block-tools mark-stable -r 's3://milab-euce1-prod-pkgs-s3-block-registry/pub/releases/?region=eu-central-1'"
},
"dependencies": {
"@platforma-sdk/model": "catalog:",
"@platforma-open/milaboratories.3d-structure-based-liabilities.workflow": "workspace:*",
"@platforma-open/milaboratories.3d-structure-based-liabilities.model": "workspace:*",
"@platforma-open/milaboratories.3d-structure-based-liabilities.ui": "workspace:*"
"@platforma-open/milaboratories.3d-structure-based-liabilities.ui": "workspace:*",
"@platforma-open/milaboratories.3d-structure-based-liabilities.workflow": "workspace:*",
"@platforma-sdk/model": "catalog:"
},
"devDependencies": {
"@platforma-sdk/block-tools": "catalog:",
"shx": "catalog:"
},
"packageManager": "pnpm@9.12.0",
"block": {
"components": {
"workflow": "@platforma-open/milaboratories.3d-structure-based-liabilities.workflow/dist/tengo/tpl/main.plj.gz",
Expand Down Expand Up @@ -49,9 +55,5 @@
"windows-x64"
]
}
},
"devDependencies": {
"@platforma-sdk/block-tools": "catalog:"
},
"packageManager": "pnpm@9.12.0"
}
}
3 changes: 2 additions & 1 deletion model/.oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"ignorePatterns": ["dist", "CHANGELOG.md"]
"extends": ["node_modules/@milaboratories/ts-builder/configs/oxfmt.json"],
"ignorePatterns": ["dist", "coverage", "CHANGELOG.md"]
}
3 changes: 2 additions & 1 deletion model/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"version": "1.2.4",
"description": "Block model",
"type": "module",
"main": "dist/index.js",
"main": "dist/index.cjs",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
".": {
Expand Down
10 changes: 2 additions & 8 deletions model/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
{
"extends": "@milaboratories/ts-configs/tsconfig.node.json",
"compilerOptions": {
"baseUrl": ".",
"outDir": "./dist",
"rootDir": "./src"
},
"include": ["src/**/*"],
"exclude": ["node_modules"]
"extends": "@milaboratories/ts-configs/block/model",
"include": ["src/**/*"]
}
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
"check": "turbo run check",
"build": "turbo run build",
"build:dev": "env PL_PKG_DEV=local turbo run build",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 --env-mode=loose removal may silently hide env vars from tests

Removing --env-mode=loose from the test script means Turbo now runs in its default (strict) mode where only env vars listed in passThroughEnv are forwarded. The turbo.json test task currently declares ["PL_ADDRESS", "PL_TEST_PASSWORD", "PL_TEST_USER", "PL_TEST_PROXY", "DEBUG"]. Any test that consumes an env var not in this list will silently receive undefined rather than a CI failure, which can produce misleading test results.

Prompt To Fix With AI
This is a comment left during a code review.
Path: package.json
Line: 10

Comment:
**`--env-mode=loose` removal may silently hide env vars from tests**

Removing `--env-mode=loose` from the `test` script means Turbo now runs in its default (strict) mode where only env vars listed in `passThroughEnv` are forwarded. The `turbo.json` `test` task currently declares `["PL_ADDRESS", "PL_TEST_PASSWORD", "PL_TEST_USER", "PL_TEST_PROXY", "DEBUG"]`. Any test that consumes an env var not in this list will silently receive `undefined` rather than a CI failure, which can produce misleading test results.

How can I resolve this? If you propose a fix, please make it concise.

Fix in Claude Code

"test": "env PL_PKG_DEV=local turbo run test --concurrency 1 --env-mode=loose",
"test": "env PL_PKG_DEV=local turbo run test --concurrency 1",
"test:dry-run": "env PL_PKG_DEV=local turbo run test --dry-run=json",
"mark-stable": "turbo run mark-stable",
"watch": "turbo watch build",
"changeset": "changeset",
"version-packages": "changeset version",
"update-sdk": "block-tools update-deps"
"update-sdk": "block-tools structure refresh --update-deps-only",
"do-pack": "turbo run do-pack",
"upgrade-sdk": "block-tools structure refresh --update-deps-only && pnpm i && block-tools structure refresh && pnpm i && pnpm fmt"
Comment on lines +17 to +19

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The upgrade-sdk script runs pnpm fmt at the end, but there is no fmt script defined in the root package.json. This will cause the command to fail with a Missing script: fmt error. Consider adding a root fmt script that delegates to turbo run fmt so that all workspace packages are formatted correctly.

    "update-sdk": "block-tools structure refresh --update-deps-only",
    "do-pack": "turbo run do-pack",
    "fmt": "turbo run fmt",
    "upgrade-sdk": "block-tools structure refresh --update-deps-only && pnpm i && block-tools structure refresh && pnpm i && pnpm fmt"

},
"devDependencies": {
"@changesets/cli": "catalog:",
Expand All @@ -25,7 +27,7 @@
},
"peerDependencies": {
"oxfmt": "*",
"oxlint": "1.63.0"
"oxlint": "*"
},
"packageManager": "pnpm@9.12.0"
}
Loading
Loading