@mnci/cli 4.12.2 → 4.12.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/README.md +4 -1
- package/dist/cli.js +6 -0
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1460,7 +1460,10 @@ extension:
|
|
|
1460
1460
|
command. Tagged `type:vscode-extension`, and `nx.name` pins the Nx project name
|
|
1461
1461
|
to the folder, so `name` (the Marketplace id is `<publisher>.<name>`) and
|
|
1462
1462
|
`displayName` are yours to change: packages stay `<project>[-<target>].vsix`
|
|
1463
|
-
and every script, task and launch entry keeps working.
|
|
1463
|
+
and every script, task and launch entry keeps working. Run `npm install` after a
|
|
1464
|
+
rename and commit the lock with it: `apps/*` is an npm workspace, the lock records
|
|
1465
|
+
the app by `name`, and CI's `npm ci` refuses a lock that names a package no
|
|
1466
|
+
manifest does (`mnci add` refreshes it for the name it writes, #251).
|
|
1464
1467
|
- **`src/main.ts`**, not `extension.ts`: the slice rules allow only `index` and
|
|
1465
1468
|
`main` at the root of `src`.
|
|
1466
1469
|
- **Unit tests run against a stub of `vscode`**, `test/vscode.stub.ts`, mapped by
|
package/dist/cli.js
CHANGED
|
@@ -4158,6 +4158,11 @@ function pinVscodeExtensionProjectNames(workspaceRoot) {
|
|
|
4158
4158
|
}
|
|
4159
4159
|
return updated;
|
|
4160
4160
|
}
|
|
4161
|
+
function refreshLockFile(workspaceRoot, name) {
|
|
4162
|
+
if (runShell("npm", ["install", "--package-lock-only", "--no-audit", "--no-fund"], workspaceRoot) !== 0) {
|
|
4163
|
+
logger.warn(`Could not refresh package-lock.json after reshaping ${name}'s manifest. Run 'npm install' before committing.`);
|
|
4164
|
+
}
|
|
4165
|
+
}
|
|
4161
4166
|
function addVscodeExtension(workspaceRoot, name, stack, options = {}) {
|
|
4162
4167
|
const { sidecar } = options;
|
|
4163
4168
|
if (sidecar !== void 0 && !fileExists((0, import_node_path15.join)(workspaceRoot, "apps", sidecar, "project.json"))) {
|
|
@@ -4183,6 +4188,7 @@ function addVscodeExtension(workspaceRoot, name, stack, options = {}) {
|
|
|
4183
4188
|
removeGeneratedEslintConfig(workspaceRoot, `apps/${name}`);
|
|
4184
4189
|
registerProjectCommands(workspaceRoot, name, { build: true });
|
|
4185
4190
|
addDebugLaunch(workspaceRoot, name);
|
|
4191
|
+
refreshLockFile(workspaceRoot, name);
|
|
4186
4192
|
}
|
|
4187
4193
|
|
|
4188
4194
|
// src/dependency-management/sync-dependencies.use-case.ts
|