release-skill 0.7.1 → 0.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "release-skill",
3
- "version": "0.7.1",
3
+ "version": "0.7.3",
4
4
  "description": "Safe preparation and frozen GitHub/npm production publishing with full happy end verification",
5
5
  "author": {
6
6
  "name": "广州市风荷科技有限公司"
@@ -78,9 +78,9 @@
78
78
  "ajv-formats": "3.0.1",
79
79
  "libnpmpublish": "11.1.0",
80
80
  "npm-registry-fetch": "18.0.2",
81
- "skill-family-contracts": "0.8.0",
82
- "skill-family-engineering-kit": "0.8.0",
83
- "skill-family-harness-node": "0.8.0",
81
+ "skill-family-contracts": "0.8.1",
82
+ "skill-family-engineering-kit": "0.8.1",
83
+ "skill-family-harness-node": "0.8.1",
84
84
  "yaml": "2.9.0"
85
85
  },
86
86
  "devDependencies": {
@@ -2,11 +2,11 @@
2
2
  "schemaVersion": "1.0.0",
3
3
  "platformId": "release-skill",
4
4
  "platformName": "release-skill Plugin Platform",
5
- "version": "0.7.1",
5
+ "version": "0.7.3",
6
6
  "logicalRoot": "skills-src/",
7
7
  "logicalRootDigest": "3767fc36f42ca561f5e839cea7b7e5bc16d08c47867b5bd6086f25efd0cb0f06",
8
8
  "projectionDigest": "419f7f9601015459956e10aae74f42240ab2ac248238ff7494f3e761643d1749",
9
- "projectionId": "release-skill:platform:0.7.1",
9
+ "projectionId": "release-skill:platform:0.7.3",
10
10
  "manifestRequired": true,
11
11
  "projectionSources": {
12
12
  "skills-src-root": {
@@ -150,17 +150,6 @@ function verifyRuntimeReadsResolve(content, outDir) {
150
150
  return [...missing].sort();
151
151
  }
152
152
 
153
- // Inlined Foundation modules must not perform bundle-relative runtime reads
154
- // of files that adapter closures do not ship. skill-family-harness-node's
155
- // report.mjs reads its own package.json at module init
156
- // (readFileSync(new URL("../package.json", import.meta.url))); once inlined
157
- // into the bundle that read resolves next to the bundle and breaks in
158
- // adapter closures (which ship no package.json by design — the banner
159
- // injects __bundlePkg instead). Neutralize the read at build time with the
160
- // same injected package identity, fail-closed if Foundation changes shape.
161
- const REPORT_PACKAGE_META_READ_RE =
162
- /JSON\.parse\(readFileSync\(new URL\("\.\.\/package\.json", import\.meta\.url\), "utf8"\)\)/;
163
-
164
153
  async function buildBundle() {
165
154
  // Dynamic import so the script works even if esbuild is not yet installed.
166
155
  let esbuild;
@@ -175,25 +164,6 @@ async function buildBundle() {
175
164
  const sourceDigest = await computeBundleSourceDigest(PKG_ROOT);
176
165
  const banner = buildBanner({ name: pkgJson.name, version: pkgJson.version }, sourceDigest);
177
166
 
178
- const identity = Object.freeze({ name: pkgJson.name, version: pkgJson.version });
179
-
180
- const identityPlugins = [{
181
- name: 'inline-foundation-package-identity',
182
- setup(build) {
183
- build.onLoad({ filter: /skill-family-harness-node[\\/]src[\\/]report\.mjs$/ }, async (args) => {
184
- const source = await readFile(args.path, 'utf-8');
185
- const injected = source.replace(REPORT_PACKAGE_META_READ_RE, () =>
186
- `Object.freeze(${JSON.stringify(identity)})`);
187
- if (injected === source) {
188
- throw new Error(
189
- 'build-bundle: could not neutralize Foundation report.mjs package.json read',
190
- );
191
- }
192
- return { contents: injected, loader: 'js' };
193
- });
194
- },
195
- }];
196
-
197
167
  const result = await esbuild.build({
198
168
  entryPoints: [ENTRY],
199
169
  absWorkingDir: PKG_ROOT,
@@ -203,7 +173,6 @@ async function buildBundle() {
203
173
  target: 'node22',
204
174
  outfile: OUTFILE,
205
175
  banner: { js: banner },
206
- plugins: identityPlugins,
207
176
  // External: Node.js builtins, native addon loader, and the native addon itself.
208
177
  external: [
209
178
  'node:*',
@@ -180,8 +180,9 @@ function validateManifestEntry(entry, key) {
180
180
 
181
181
  function requireAddon(addonPath) {
182
182
  try {
183
- // Use PKG_ROOT-relative resolution so bundled mode can find the addon.
184
- const require = createRequire(resolve(PKG_ROOT, 'package.json'));
183
+ // Anchor require() to a file present in both the source package and every
184
+ // generated adapter. Adapter roots intentionally do not ship package.json.
185
+ const require = createRequire(resolve(PKG_ROOT, 'bin/release-skill.mjs'));
185
186
  return require(addonPath);
186
187
  } catch (err) {
187
188
  throw new ReleaseError(SAFE_WRITE_UNAVAILABLE, sanitizeError(err));