New plugins - #10
Conversation
📝 WalkthroughWalkthroughThe repository updates Nx and Vite tooling, adds related development packages, adjusts workspace build permissions, ignores generated Vite timestamp files, and simplifies NativeScript typings scripts. ChangesTooling configuration
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
nx.json (1)
46-50: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winRemove the deprecated
servetarget unless compatibility requires it.Nx documents
serveTargetNameas deprecated anddevTargetNameas its replacement. The two names represent the same Vite development-server capability. (nx.dev)Remove
serveTargetNameunless existing scripts or projects still requirenx serve.Suggested configuration
"devTargetName": "dev", - "serveTargetName": "serve", "previewTargetName": "preview",🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@nx.json` around lines 46 - 50, Remove the deprecated serveTargetName entry from the Nx configuration, while retaining devTargetName as the development-server target. Preserve serveTargetName only if repository scripts or projects explicitly depend on nx serve.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@nx.json`:
- Line 60: Update the preVersionCommand release hook in nx.json to invoke Nx
through the repository-pinned pnpm executable, replacing the npx command with
pnpm exec nx while preserving the existing run-many build arguments.
In `@packages/ns-wamr/package.json`:
- Around line 158-159: Update the typings.ios and typings.android scripts in
package.json to execute their respective ns typings commands from the
apps/ns-wasm-test working directory, so generated declarations are written to
that app’s typings directory.
---
Nitpick comments:
In `@nx.json`:
- Around line 46-50: Remove the deprecated serveTargetName entry from the Nx
configuration, while retaining devTargetName as the development-server target.
Preserve serveTargetName only if repository scripts or projects explicitly
depend on nx serve.
🪄 Autofix
✅ Autofix completed
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 94995fd9-0c17-4fed-8215-abffeff53652
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (5)
.gitignorenx.jsonpackage.jsonpackages/ns-wamr/package.jsonpnpm-workspace.yaml
| "analytics": true, | ||
| "release": { | ||
| "version": { | ||
| "preVersionCommand": "npx nx run-many -t build" |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -eu
printf '%s\n' '--- repository files ---'
git ls-files | rg '(^|/)(nx\.json|package\.json|pnpm-lock\.yaml|package-lock\.json|yarn\.lock|\.npmrc|\.nvmrc|\.node-version)$' || true
printf '%s\n' '--- nx.json ---'
cat -n nx.json | sed -n '45,70p'
printf '%s\n' '--- package-manager declarations ---'
for f in package.json .npmrc .nvmrc .node-version; do
if [ -f "$f" ]; then
printf '%s\n' "--- $f ---"
cat -n "$f" | sed -n '1,80p'
fi
done
printf '%s\n' '--- Nx command conventions ---'
rg -n --glob '!node_modules' --glob '!dist' --glob '!build' \
'(^|[[:space:]"'\''])((pnpm|npm|yarn|npx)[[:space:]]+exec[[:space:]]+nx|npx[[:space:]]+nx|pnpm[[:space:]]+nx)' \
.github . 2>/dev/null | head -120 || trueRepository: listepo/cross-code
Length of output: 9711
🏁 Script executed:
#!/bin/bash
set -eu
python3 - <<'PY'
import json
from pathlib import Path
package = json.loads(Path("package.json").read_text())
nx = json.loads(Path("nx.json").read_text())
manager = package.get("packageManager")
command = nx["release"]["version"]["preVersionCommand"]
print(f"packageManager={manager}")
print(f"preVersionCommand={command}")
print(f"uses_pnpm_exec_nx={command.startswith('pnpm exec nx ')}")
print(f"uses_npx_nx={command.startswith('npx nx ')}")
PYRepository: listepo/cross-code
Length of output: 268
Use pnpm exec nx in the release hook.
package.json pins pnpm@11.20.0. Replace npx nx run-many -t build with pnpm exec nx run-many -t build.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@nx.json` at line 60, Update the preVersionCommand release hook in nx.json to
invoke Nx through the repository-pinned pnpm executable, replacing the npx
command with pnpm exec nx while preserving the existing run-many build
arguments.
Source: Coding guidelines
| "typings.ios": "ns typings ios", | ||
| "typings.android": "ns typings android", |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
printf '%s\n' '--- changed package scripts ---'
git diff -- packages/ns-wamr/package.json
printf '%s\n' '--- package and workspace files ---'
git ls-files 'package.json' 'nx.json' 'pnpm-workspace.yaml' 'apps/ns-wasm-test/**' 'packages/ns-wamr/**' | sed -n '1,160p'
printf '%s\n' '--- NativeScript app package metadata ---'
if [ -f apps/ns-wasm-test/package.json ]; then
cat -n apps/ns-wasm-test/package.json | sed -n '1,220p'
fi
printf '%s\n' '--- package directory metadata ---'
cat -n packages/ns-wamr/package.json | sed -n '130,180p'
printf '%s\n' '--- references to typings scripts and ns-wasm-test ---'
rg -n --hidden --glob '!node_modules' 'typings\.(ios|android)|ns typings|ns-wasm-test' .Repository: listepo/cross-code
Length of output: 24007
🏁 Script executed:
python3 - <<'PY'
from pathlib import Path
import json
root = Path(".")
app = root / "apps/ns-wasm-test"
plugin = root / "packages/ns-wamr"
def exists(rel):
return (root / rel).exists()
def package_json(rel):
return json.loads((root / rel).read_text())
app_pkg = package_json("apps/ns-wasm-test/package.json")
plugin_pkg = package_json("packages/ns-wamr/package.json")
print("app package name:", app_pkg.get("name"))
print("app package main:", app_pkg.get("main"))
print("app has nativescript.config.ts:", exists("apps/ns-wasm-test/nativescript.config.ts"))
print("plugin package name:", plugin_pkg.get("name"))
print("plugin package main:", plugin_pkg.get("main"))
print("plugin has nativescript.config.ts:", exists("packages/ns-wamr/nativescript.config.ts"))
print("plugin typings scripts:", plugin_pkg["scripts"].get("typings.ios"), "|", plugin_pkg["scripts"].get("typings.android"))
workspace = (root / "pnpm-workspace.yaml").read_text()
print("workspace excludes app:", "apps/ns-wasm-test" in workspace and "NOT a member" in workspace)
guidance = (root / "AGENTS.md").read_text()
start = guidance.index("### `ns typings` before native-API TypeScript")
end = guidance.index("\n### ", start + 5) if "\n### " in guidance[start + 5:] else start + 500
print("root guidance excerpt:")
print(guidance[start:end].strip())
PY
printf '%s\n' '--- NativeScript configuration locations ---'
for f in apps/ns-wasm-test/nativescript.config.ts packages/ns-wamr/nativescript.config.ts; do
echo "--- $f"
cat -n "$f"
done
printf '%s\n' '--- workspace boundary ---'
cat -n pnpm-workspace.yamlRepository: listepo/cross-code
Length of output: 4740
Run ns typings from the NativeScript app.
These scripts run from packages/ns-wamr, but NativeScript requires the prepared project at apps/ns-wasm-test and writes declarations to its typings/ directory. Use the app working directory for both commands.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/ns-wamr/package.json` around lines 158 - 159, Update the typings.ios
and typings.android scripts in package.json to execute their respective ns
typings commands from the apps/ns-wasm-test working directory, so generated
declarations are written to that app’s typings directory.
Fixes Applied SuccessfullyFixed 2 file(s) based on 2 unresolved review comments. Files modified:
Commit: The changes have been pushed to the Time taken: |
Fixed 2 file(s) based on 2 unresolved review comments. Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
Summary by CodeRabbit