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
1 change: 1 addition & 0 deletions packages/platform-objects/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -74,6 +74,7 @@
"devDependencies": {
"@objectstack/core": "workspace:*",
"@objectstack/formula": "workspace:*",
"@objectstack/lint": "workspace:*",
"@types/node": "^26.1.2",
"tsup": "^8.5.1",
"typescript": "^6.0.3",
Expand Down

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion packages/platform-objects/tsconfig.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,8 @@
"outDir": "./dist",
"rootDir": "./src",
"declaration": true,
"declarationMap": true
"declarationMap": true,
"types": ["node"]
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist", "**/*.test.ts"]
Expand Down
49 changes: 49 additions & 0 deletions packages/platform-objects/vitest.config.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.

import { defineConfig } from 'vitest/config';
import path from 'node:path';

export default defineConfig({
resolve: {
// One entry, for `managed-api-method-affordance-sweep.test.ts` (#7934) —
// the only suite here that imports a sibling package as a VALUE. It calls
// `validateManagedApiMethods` from `@objectstack/lint` over every
// code-shipped managed object in the checkout.
//
// Unaliased, that specifier resolves through `exports` to `lint/dist` — a
// BUILD ARTIFACT — which would make this sweep a verdict about build state
// rather than about the source next to it (`pnpm check:test-source-alias`,
// #7668/#7778). The loud failure (missing export) is the mild half; a dist
// merely BEHIND lets the sweep run GREEN against the rule's old behaviour
// with nothing in the output saying so. That is acutely wrong for THIS
// suite: its entire purpose is to run the CURRENT rule over the CURRENT
// objects, so a stale rule silently narrows the very population it exists
// to judge, and the sweep keeps reporting zero findings while it does.
//
// Turbo already orders `test` after `^build`, so `turbo run test` was never
// the failing path. The paths it does not mediate are `pnpm test` inside
// this package, `vitest run <file>`, an editor runner, or an agent working
// in a tree built at an older commit — precisely the ways this sweep gets
// re-run WHILE someone is changing the affordance rule.
//
// Array form with an anchored pattern, deliberately, and here that is
// load-bearing rather than stylistic: `@objectstack/lint` exports a second
// subpath (`./runtime`), and the object form matches by PREFIX, so a bare
// `@objectstack/lint` key with a FILE replacement would also swallow
// `@objectstack/lint/runtime` and resolve it to `…/lint/src/index.ts/runtime`
// — `ENOTDIR`, at run time, in a config that reads as correct. Same shape as
// `packages/rest`'s config (#7955) and `service-storage`'s (#7778).
alias: [
{
find: /^@objectstack\/lint$/,
replacement: path.resolve(__dirname, '../lint/src/index.ts'),
},
],
},
// No `test` block: this package had no vitest config until now, so its suite
// ran on vitest's defaults. Leaving discovery untouched keeps this file's only
// effect the alias above — the sweep's population floors (76 object files / 51
// in-scope / 9 packages) are measured by walking the filesystem, but the rest
// of the package's suite is discovered by vitest, and narrowing `include` here
// would silently drop cases while the gate this file answers went green.
});
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions scripts/check-cross-package-test-inputs.mjs
Original file line numberDiff line numberDiff line change
Expand Up@@ -125,6 +125,13 @@ const CROSS_PACKAGE_TEST_INPUTS = {
'packages/services/service-automation/src/**',
],
},
'@objectstack/platform-objects': {
// src/managed-api-method-affordance-sweep.test.ts (#7934) imports every
// `*.object.ts` in the monorepo and runs `validateManagedApiMethods` over
// it — the population `os lint` never walks, because these objects ship as
// code rather than in an authored stack.
globs: ['packages/**/*.object.ts'],
},
'@objectstack/plugin-auth': {
// src/managed-extension-fields.test.ts walks every `*.object.ts`, and pins
// core's api-key source alongside it.
Expand Down
11 changes: 11 additions & 0 deletions turbo.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -77,6 +77,17 @@
"$TURBO_ROOT$/packages/services/service-automation/src/**"
]
},
"@objectstack/platform-objects#test": {
"dependsOn": ["^build"],
"outputs": [],
"inputs": [
"$TURBO_DEFAULT$",
"!dist/**",
"!coverage/**",
"!.turbo/**",
"$TURBO_ROOT$/packages/**/*.object.ts"
]
},
"@objectstack/plugin-auth#test": {
"dependsOn": ["^build"],
"outputs": [],
Expand Down
Loading