Skip to content

New plugins - #10

Open
listepo wants to merge 3 commits into
mainfrom
new-plugins
Open

New plugins#10
listepo wants to merge 3 commits into
mainfrom
new-plugins

Conversation

@listepo

@listepo listepo commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Chores
    • Updated project tooling and build configuration to support Vite and Nx workflows.
    • Improved development, preview, serving, type-checking, and dependency task integration.
    • Refined workspace package management and build handling for smoother setup.
    • Updated mobile platform typing commands for more reliable execution.
    • Added ignore rules for generated Vite configuration files.
    • Reformatted project configuration without changing existing analytics or release behavior.

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The repository updates Nx and Vite tooling, adds related development packages, adjusts workspace build permissions, ignores generated Vite timestamp files, and simplifies NativeScript typings scripts.

Changes

Tooling configuration

Layer / File(s) Summary
Package and workspace tooling
package.json, pnpm-workspace.yaml, .gitignore
The root manifest adds Nx and web tooling packages plus an empty dependencies object. pnpm disables unrs-resolver build scripts. Git ignores timestamped Vite configuration files.
Nx and Vite integration
nx.json
Nx production inputs exclude test setup files. The @nx/vite/plugin maps build, serve, development, preview, static serving, typecheck, dependency-build, and dependency-watch targets. Existing target behavior remains.
NativeScript typings scripts
packages/ns-wamr/package.json
The iOS and Android typings scripts run ns typings from the package root.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • listepo/cross-code#8: Related Nx/Vite and workspace configuration for the migrated Vitest NativeScript test app.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately identifies the main change: adding new Nx and Vite plugins and related tooling.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch new-plugins

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
nx.json (1)

46-50: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Remove the deprecated serve target unless compatibility requires it.

Nx documents serveTargetName as deprecated and devTargetName as its replacement. The two names represent the same Vite development-server capability. (nx.dev)

Remove serveTargetName unless existing scripts or projects still require nx 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

📥 Commits

Reviewing files that changed from the base of the PR and between dfc3acc and d6d9749.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (5)
  • .gitignore
  • nx.json
  • package.json
  • packages/ns-wamr/package.json
  • pnpm-workspace.yaml

Comment thread nx.json Outdated
"analytics": true,
"release": {
"version": {
"preVersionCommand": "npx nx run-many -t build"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 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 || true

Repository: 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 ')}")
PY

Repository: 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

Comment thread packages/ns-wamr/package.json Outdated
Comment on lines +158 to +159
"typings.ios": "ns typings ios",
"typings.android": "ns typings android",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 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.yaml

Repository: 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.

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

Fixes Applied Successfully

Fixed 2 file(s) based on 2 unresolved review comments.

Files modified:

  • nx.json
  • packages/ns-wamr/package.json

Commit: d16ad8647fc7a62a1d12eb74ce615d196c4811a5

The changes have been pushed to the new-plugins branch.

Time taken: 2m 18s

Fixed 2 file(s) based on 2 unresolved review comments.

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant