Skip to content

Latest commit

 

History

History
61 lines (38 loc) · 3.81 KB

crychart-integration.md

File metadata and controls

61 lines (38 loc) · 3.81 KB

Install CRYChart with pnpm

简体中文

OpenTest pins the public package @crysound/crychart to version 1.0.2. It includes the high-precision X-axis interval cap used by waveform detail charts. CRYChart and OpenTest have separate version numbers.

Install and import

The repository .npmrc routes the @crysound scope to npmjs.com. Install from the OpenTest root:

pnpm install --frozen-lockfile

To add the package or select a different release, specify an exact version:

pnpm --filter @opentest/frontend add --save-exact @crysound/crychart@1.0.2

Commit apps/frontend/package.json and the root pnpm-lock.yaml together. Use an exact version without ^ or ~. The lockfile records the package integrity digest. The public package can be installed without publisher credentials.

The package exposes the chart factory and types at the main entry point and themes at the themes subpath:

import { cryChart } from '@crysound/crychart'
import type { CRYChart, CRYChartOptions } from '@crysound/crychart'
import { Themes } from '@crysound/crychart/themes'

The package includes TypeScript declarations for both entry points. You do not need a separate @types package. CommonJS consumers can import themes from the main entry point. The chart factory, public types, and browser global keep their names.

Plugins continue to use the host chart API. They do not install or bundle a second copy of CRYChart. This migration does not change the plugin SDK.

Verify an upgrade

node --test tools/__tests__/cry-chart.test.mjs tools/__tests__/standalone-packaging.test.mjs
pnpm --filter @opentest/frontend typecheck
pnpm --filter @opentest/frontend build

During installation, pnpm verifies the downloaded archive against integrity in pnpm-lock.yaml. OpenTest relies on that lockfile digest. It keeps no separate digest per version, so the check does not independently verify the publisher or the digest recorded in the lockfile.

tools/chart-build-integrity.mjs checks that the declared, locked, and installed versions agree. If the lockfile includes tarball, the URL must exactly match the npm registry URL for the declared package and version. When the lockfile omits tarball, pnpm uses the configured registry for package resolution. The build has no tarball URL to verify.

The script checks the installed package name, entry point, types, and required APIs. At build time, it records digests of the installed entry point, types, and generated JavaScript. Packaging compares the current files with that build record before copying the output.

When you upgrade CRYChart, specify the new version, rerun the checks above, and verify chart behavior. Component tests and builds do not replace real device acquisition, long runs, or installer acceptance.

vendor/crychart/ retains the former archives, patches, and validation records. The current dependency and build checks do not use those files. Do not apply the old manifest's versions, digests, or test results to the npm release.

The Windows artifact audit scripts tied to the old archive validation instance still read that historical manifest. Use verifyHostChartBuildIntegrity for current npm builds. It checks the build output against the record produced by that build.

License and source

CRYChart uses the CRYChart Community License 1.0, including its commercial-use terms. OpenTest includes both language versions of the license and lists CRYChart in apps/frontend/public/THIRD-PARTY-NOTICES.txt. The chart engine needs no runtime license key or license environment variable.