שאלו את שאלתכם וקבלו סיכום של המסמך על ידי הפניה לדף הזה ולספק ה-AI שתבחרו
היסטוריית גרסאות
- "Add upgrade command"v9.5.823.9.2026
התוכן של הדף הזה תורגם באמצעות AI.
צפייה בגרסה האחרונה של התוכן המקורי באנגליתאם יש לכם רעיון לשיפור התיעוד הזה, אל תהססו לתרום על ידי הגשת Pull Request ב-GitHub.
קישור GitHub לתיעודהעתקת ה-Markdown של המסמך ללוח
Upgrade Intlayer Packages
העתקת הקוד ללוח
The upgrade command lists the Intlayer packages declared in every package.json of your project, including monorepo workspaces, and upgrades them to the latest published version. It runs the same package upgrade step as intlayer init, on its own.
Arguments:
--project-root [projectRoot]- Optional. The project root directory. By default, the command starts from the nearestpackage.jsonabove the current working directory.--dry-run- Optional. Lists the packages and their target version without modifying any file.--tag <tag>- Optional. The npm dist-tag to upgrade to (for examplecanary). Defaults tolatest.
What it does:
- Lists the Intlayer packages - Scans every
package.jsonof the project (skippingnode_modulesand build outputs) forintlayer,@intlayer/*,*-intlayerandintlayer-*dependencies and dev dependencies. - Fetches the target version - Reads the version of the selected dist-tag (
latestby default) of each package from the npm registry. - Rewrites the ranges - Updates each outdated range in place, keeping its operator (
^,~or none) and the file indentation. - Installs once - Runs a single install from the workspace root (the nearest directory with a lock file), using the package manager that owns the lock file:
פתיחת הטבלה בחלון כדי לראות את כל תוכן הנתונים בבירור
| Lock file | Command |
|---|---|
bun.lock / bun.lockb | bun install |
pnpm-lock.yaml | pnpm install |
yarn.lock | yarn install |
package-lock.json or no lock | npm install |
If there is no lock file, the packageManager field of package.json (for example "bun@1.2.0") is used before falling back to npm.
Ranges that do not point to the registry, such as workspace:*, file:, link:, catalog: or git URLs, are never modified.
Examples:
List the available upgrades without applying them:
העתקת הקוד ללוח
Upgrade to the canary release:
העתקת הקוד ללוח
Example output:
העתקת הקוד ללוח
Notes:
- Run the command from the root of your repository to upgrade every workspace. Run it from a workspace to upgrade that workspace only.
- Packages whose version cannot be fetched (offline, private or unpublished package) are listed and left unchanged.
- If the install fails, the upgraded ranges are kept in
package.json. Run your package manager's install command manually.
