@walkeros/config 4.1.0 → 4.1.1-next-1779485810490

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/CHANGELOG.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # @walkeros/config
2
2
 
3
+ ## 4.1.1-next-1779485810490
4
+
3
5
  ## 4.1.0
4
6
 
5
7
  ## 4.0.2
package/jest/index.mjs CHANGED
@@ -29,7 +29,10 @@ function getModuleMapper() {
29
29
  if (existsSync(pkgJsonPath)) {
30
30
  const pkg = JSON.parse(readFileSync(pkgJsonPath, 'utf8'));
31
31
 
32
- if (pkg.name?.startsWith('@walkeros/') && existsSync(path.join(fullPath, 'src'))) {
32
+ if (
33
+ pkg.name?.startsWith('@walkeros/') &&
34
+ existsSync(path.join(fullPath, 'src'))
35
+ ) {
33
36
  // Map root export: @walkeros/core → packages/core/src/
34
37
  mapper[`^${escapeRegex(pkg.name)}$`] = path.join(fullPath, 'src/');
35
38
 
@@ -44,7 +47,8 @@ function getModuleMapper() {
44
47
  existsSync(srcFile + '.tsx') ||
45
48
  existsSync(path.join(srcFile, 'index.ts'))
46
49
  ) {
47
- mapper[`^${escapeRegex(pkg.name)}/${escapeRegex(subName)}$`] = srcFile;
50
+ mapper[`^${escapeRegex(pkg.name)}/${escapeRegex(subName)}$`] =
51
+ srcFile;
48
52
  }
49
53
  }
50
54
  }
@@ -61,11 +65,11 @@ function getModuleMapper() {
61
65
  if (Object.keys(mapper).length === 0) {
62
66
  throw new Error(
63
67
  `[jest-config] moduleNameMapper is empty — no @walkeros/* packages found.\n` +
64
- ` packagesDir: ${packagesDir}\n` +
65
- ` scanDir: ${scanDir}\n` +
66
- ` scanDir exists: ${existsSync(scanDir)}\n` +
67
- `This usually means a stale @walkeros/config copy was loaded from node_modules ` +
68
- `instead of the workspace version. Run: npm dedupe @walkeros/config`,
68
+ ` packagesDir: ${packagesDir}\n` +
69
+ ` scanDir: ${scanDir}\n` +
70
+ ` scanDir exists: ${existsSync(scanDir)}\n` +
71
+ `This usually means a stale @walkeros/config copy was loaded from node_modules ` +
72
+ `instead of the workspace version. Run: npm dedupe @walkeros/config`,
69
73
  );
70
74
  }
71
75
 
@@ -80,7 +84,10 @@ function getGlobals() {
80
84
  const pkg = JSON.parse(readFileSync(packagePath, 'utf8'));
81
85
  version = pkg.version || '0.0.0';
82
86
  } catch (error) {
83
- console.warn('Could not read package.json for version injection in tests:', error.message);
87
+ console.warn(
88
+ 'Could not read package.json for version injection in tests:',
89
+ error.message,
90
+ );
84
91
  }
85
92
 
86
93
  return {
@@ -110,17 +117,25 @@ const config = {
110
117
  testMatch: ['<rootDir>/**/*.test.(ts|tsx|js|jsx)'],
111
118
  moduleFileExtensions: ['js', 'ts', 'tsx', 'mjs', 'json'],
112
119
  rootDir: '.',
113
- moduleDirectories: ['node_modules', 'src', path.join(packagesDir, 'node_modules')],
120
+ moduleDirectories: [
121
+ 'node_modules',
122
+ 'src',
123
+ path.join(packagesDir, 'node_modules'),
124
+ ],
114
125
  extensionsToTreatAsEsm: ['.ts', '.tsx'],
115
126
  moduleNameMapper: getModuleMapper(),
116
127
  globals: getGlobals(),
117
-
118
- // Performance settings - reduced for devcontainer memory constraints
119
- maxWorkers: 2,
128
+
129
+ // Adaptive worker count: 50% of host CPUs so it scales to the machine
130
+ // (8-core devcontainer -> 4 workers, 2-core CI runner -> 1 worker) instead of
131
+ // a hardcoded number that oversubscribes small CI runners. Memory-bounded so a
132
+ // bloated worker is recycled (~90MB/worker measured). CLI overrides to 3.
133
+ maxWorkers: '50%',
134
+ workerIdleMemoryLimit: '512MB',
120
135
  testTimeout: 30000,
121
136
  clearMocks: true,
122
137
  restoreMocks: true,
123
-
138
+
124
139
  // Exclude from module resolution (prevents Haste collisions with cached packages)
125
140
  modulePathIgnorePatterns: ['<rootDir>/.tmp', '/dist/'],
126
141
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@walkeros/config",
3
- "version": "4.1.0",
3
+ "version": "4.1.1-next-1779485810490",
4
4
  "type": "module",
5
5
  "description": "Shared development configuration for walkerOS packages (TypeScript, ESLint, Jest, tsup)",
6
6
  "license": "MIT",