Skip to content
Open
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: 3 additions & 0 deletions core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"type": "git",
"url": "https://github.com/google/adk-js"
},
"engines": {
"node": ">=22.12.0"
},
"files": [
"package.json",
"README.md",
Expand Down
3 changes: 3 additions & 0 deletions dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"type": "git",
"url": "https://github.com/google/adk-js"
},
"engines": {
"node": ">=22.12.0"
},
"files": [
"package.json",
"README.md",
Expand Down
3 changes: 3 additions & 0 deletions integrations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"type": "git",
"url": "https://github.com/google/adk-js"
},
"engines": {
"node": ">=22.12.0"
},
"files": [
"package.json",
"README.md",
Expand Down
9 changes: 9 additions & 0 deletions package-lock.json

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

41 changes: 41 additions & 0 deletions tests/integration/package_manifests/engines_test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/**
* @license
* Copyright 2026 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import {readFile} from 'node:fs/promises';
import path from 'node:path';
import {describe, expect, it} from 'vitest';

/**
* Workspace directories whose package.json is published to npm. The root
* manifest is excluded: it is the workspace container, not a deliverable.
*/
const PUBLISHED_WORKSPACES = ['core', 'dev', 'integrations'];

/**
* Consumer-facing Node.js floor. 22.12.0 is the lowest release on a supported
* LTS line that satisfies every engine constraint in the production dependency
* closure. All three published manifests must agree on it.
*/
const EXPECTED_NODE_RANGE = '>=22.12.0';

interface Manifest {
name?: string;
engines?: {node?: string};
}

async function readManifest(workspace: string): Promise<Manifest> {
const manifestPath = path.join(process.cwd(), workspace, 'package.json');
return JSON.parse(await readFile(manifestPath, 'utf8')) as Manifest;
}

describe('published package manifests', () => {
it.each(PUBLISHED_WORKSPACES)(
'%s declares the shared engines.node range',
async (workspace) => {
const manifest = await readManifest(workspace);
expect(manifest.engines?.node).toBe(EXPECTED_NODE_RANGE);
},
);
});
Loading