nx 22.2.0-canary.20251201-731aba3 → 22.2.0-canary.20251203-2e442d5

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.
Binary file
@@ -1,3 +0,0 @@
1
- import { Tree } from '../../generators/tree';
2
- export default function addGitignoreEntry(tree: Tree): Promise<void>;
3
- //# sourceMappingURL=add-gitignore-entry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"add-gitignore-entry.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/migrations/update-21-1-0/add-gitignore-entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAG7C,wBAA8B,iBAAiB,CAAC,IAAI,EAAE,IAAI,iBAoBzD"}
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = addGitignoreEntry;
4
- const ignore = require("ignore");
5
- async function addGitignoreEntry(tree) {
6
- if (!tree.exists('nx.json')) {
7
- return;
8
- }
9
- const GITIGNORE_ENTRIES = [
10
- '.cursor/rules/nx-rules.mdc',
11
- '.github/instructions/nx.instructions.md',
12
- ];
13
- if (!tree.exists('.gitignore')) {
14
- return;
15
- }
16
- let content = tree.read('.gitignore', 'utf-8') || '';
17
- const ig = ignore().add(content);
18
- for (const entry of GITIGNORE_ENTRIES) {
19
- if (!ig.ignores(entry)) {
20
- content = content.trimEnd() + '\n' + entry + '\n';
21
- }
22
- }
23
- tree.write('.gitignore', content);
24
- }