@unisphere/nx 3.19.2 → 3.19.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.
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Migration: Add Claude Code configuration to root .gitignore
3
+ *
4
+ * Adds .claude/* and !.claude/skills entries to root .gitignore to exclude
5
+ * Claude Code files while preserving skills directory.
6
+ */
7
+ import { Tree } from '@nx/devkit';
8
+ export default function update(tree: Tree): Promise<void>;
9
+ //# sourceMappingURL=add-claude-config-to-root-gitignore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-claude-config-to-root-gitignore.d.ts","sourceRoot":"","sources":["../../../src/migrations/3-19-3/add-claude-config-to-root-gitignore.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,IAAI,EAAU,MAAM,YAAY,CAAC;AAE1C,wBAA8B,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CA0D9D"}
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ /**
3
+ * Migration: Add Claude Code configuration to root .gitignore
4
+ *
5
+ * Adds .claude/* and !.claude/skills entries to root .gitignore to exclude
6
+ * Claude Code files while preserving skills directory.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.default = update;
10
+ const devkit_1 = require("@nx/devkit");
11
+ async function update(tree) {
12
+ devkit_1.logger.info('🔄 Updating root .gitignore to add Claude Code configuration...');
13
+ const gitignorePath = '.gitignore';
14
+ if (!tree.exists(gitignorePath)) {
15
+ devkit_1.logger.warn('âš ī¸ .gitignore file not found, creating one');
16
+ tree.write(gitignorePath, '');
17
+ }
18
+ try {
19
+ const currentContent = tree.read(gitignorePath, 'utf-8') || '';
20
+ let updatedContent = currentContent;
21
+ let hasChanges = false;
22
+ // Check if .claude/* entry already exists
23
+ const claudeWildcardRegex = /^\.claude\/\*\s*$/gm;
24
+ if (!claudeWildcardRegex.test(updatedContent)) {
25
+ // Add section comment if needed
26
+ if (!updatedContent.includes('# Claude Code configuration')) {
27
+ updatedContent = updatedContent.trim() + '\n\n# Claude Code configuration\n';
28
+ }
29
+ // Add .claude/* entry
30
+ if (!updatedContent.includes('.claude/*')) {
31
+ updatedContent += '.claude/*\n';
32
+ devkit_1.logger.info('📝 Added .claude/* to .gitignore');
33
+ hasChanges = true;
34
+ }
35
+ }
36
+ else {
37
+ devkit_1.logger.info('â„šī¸ .claude/* already exists in .gitignore');
38
+ }
39
+ // Check if !.claude/skills entry already exists
40
+ const claudeSkillsRegex = /^!\.claude\/skills\s*$/gm;
41
+ if (!claudeSkillsRegex.test(updatedContent)) {
42
+ // Add !.claude/skills entry
43
+ if (!updatedContent.includes('!.claude/skills')) {
44
+ updatedContent += '!.claude/skills\n';
45
+ devkit_1.logger.info('📝 Added !.claude/skills to .gitignore');
46
+ hasChanges = true;
47
+ }
48
+ }
49
+ else {
50
+ devkit_1.logger.info('â„šī¸ !.claude/skills already exists in .gitignore');
51
+ }
52
+ if (hasChanges) {
53
+ tree.write(gitignorePath, updatedContent);
54
+ devkit_1.logger.info('✅ Successfully updated .gitignore');
55
+ }
56
+ else {
57
+ devkit_1.logger.info('â„šī¸ No changes needed - all entries already exist');
58
+ }
59
+ }
60
+ catch (error) {
61
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error';
62
+ devkit_1.logger.error(`❌ Failed to update .gitignore: ${errorMessage}`);
63
+ throw new Error(`Failed to update .gitignore: ${errorMessage}`);
64
+ }
65
+ }
package/migrations.json CHANGED
@@ -362,6 +362,14 @@
362
362
  "cli": {
363
363
  "postUpdateMessage": "✅ .gitignore files added to documentation sites"
364
364
  }
365
+ },
366
+ "3-19-3-add-claude-config-to-root-gitignore": {
367
+ "version": "3.19.3",
368
+ "description": "Adds Claude Code configuration to root .gitignore",
369
+ "factory": "./dist/migrations/3-19-3/add-claude-config-to-root-gitignore.js",
370
+ "cli": {
371
+ "postUpdateMessage": "✅ Claude Code configuration added to root .gitignore"
372
+ }
365
373
  }
366
374
  },
367
375
  "packageJsonUpdates": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unisphere/nx",
3
- "version": "3.19.2",
3
+ "version": "3.19.3",
4
4
  "private": false,
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",