@walkeros/config 0.1.0 → 0.1.1

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 CHANGED
@@ -1,6 +1,8 @@
1
1
  # @walkeros/config
2
2
 
3
- Unified development configuration package for walkerOS projects. This package provides shared configurations for TypeScript, ESLint, Jest, and tsup build tooling.
3
+ Unified development configuration package for walkerOS projects. This package
4
+ provides shared configurations for TypeScript, ESLint, Jest, and tsup build
5
+ tooling.
4
6
 
5
7
  ## Installation
6
8
 
@@ -12,7 +14,8 @@ npm install --save-dev @walkeros/config
12
14
 
13
15
  ### TypeScript Configuration
14
16
 
15
- Extend from one of the provided TypeScript configurations in your `tsconfig.json`:
17
+ Extend from one of the provided TypeScript configurations in your
18
+ `tsconfig.json`:
16
19
 
17
20
  ```json
18
21
  {
@@ -25,6 +28,7 @@ Extend from one of the provided TypeScript configurations in your `tsconfig.json
25
28
  ```
26
29
 
27
30
  **Available configs:**
31
+
28
32
  - `@walkeros/config/tsconfig/base.json` - Base configuration for all projects
29
33
  - `@walkeros/config/tsconfig/web.json` - Browser/web projects (extends base)
30
34
  - `@walkeros/config/tsconfig/node.json` - Node.js projects (extends base)
@@ -45,7 +49,9 @@ export default [
45
49
  ```
46
50
 
47
51
  **Available configs:**
48
- - `@walkeros/config/eslint` - Base configuration with TypeScript and Jest support
52
+
53
+ - `@walkeros/config/eslint` - Base configuration with TypeScript and Jest
54
+ support
49
55
  - `@walkeros/config/eslint/web` - Web projects with browser globals
50
56
  - `@walkeros/config/eslint/node` - Node.js projects with Node.js rules
51
57
 
@@ -63,6 +69,7 @@ export default {
63
69
  ```
64
70
 
65
71
  **Available configs:**
72
+
66
73
  - `@walkeros/config/jest` - Base Jest configuration with SWC transform
67
74
  - `@walkeros/config/jest/web.config` - Web projects with jsdom environment
68
75
  - `@walkeros/config/jest/node.config` - Node.js projects
@@ -80,6 +87,7 @@ export default defineConfig([buildModules()]);
80
87
  ```
81
88
 
82
89
  **Available helpers:**
90
+
83
91
  - `defineConfig` - TypeScript-friendly config wrapper
84
92
  - `buildModules()` - Build CJS and ESM modules with type declarations
85
93
  - `buildExamples()` - Build example files
@@ -95,9 +103,11 @@ export default defineConfig([buildModules()]);
95
103
 
96
104
  ## Migration from Separate Packages
97
105
 
98
- If you were previously using the separate config packages (`@walkeros/tsconfig`, `@walkeros/eslint`, `@walkeros/jest`, `@walkeros/tsup`), update your imports:
106
+ If you were previously using the separate config packages (`@walkeros/tsconfig`,
107
+ `@walkeros/eslint`, `@walkeros/jest`, `@walkeros/tsup`), update your imports:
99
108
 
100
109
  **Before:**
110
+
101
111
  ```json
102
112
  // package.json
103
113
  "devDependencies": {
@@ -117,6 +127,7 @@ import from '@walkeros/tsup';
117
127
  ```
118
128
 
119
129
  **After:**
130
+
120
131
  ```json
121
132
  // package.json
122
133
  "devDependencies": {
@@ -138,4 +149,5 @@ MIT
138
149
 
139
150
  ## Contributing
140
151
 
141
- Issues and pull requests are welcome at [github.com/elbwalker/walkerOS](https://github.com/elbwalker/walkerOS).
152
+ Issues and pull requests are welcome at
153
+ [github.com/elbwalker/walkerOS](https://github.com/elbwalker/walkerOS).
@@ -1,4 +1,4 @@
1
- const mockDataLayer = jest.fn(); //.mockImplementation(console.log);
1
+ const mockDataLayer = jest.fn();
2
2
 
3
3
  global.beforeEach(() => {
4
4
  jest.useFakeTimers();
@@ -1,6 +1,6 @@
1
1
  import '@testing-library/jest-dom';
2
2
 
3
- const mockDataLayer = jest.fn(); //.mockImplementation(console.log);
3
+ const mockDataLayer = jest.fn();
4
4
 
5
5
  global.beforeEach(() => {
6
6
  jest.useFakeTimers();
@@ -11,13 +11,13 @@ global.beforeEach(() => {
11
11
 
12
12
  // reset DOM with event listeners etc.
13
13
  document.getElementsByTagName('html')[0].innerHTML = '';
14
- document.body = document.body.cloneNode() as HTMLElement;
14
+ document.body = document.body.cloneNode();
15
15
 
16
16
  // elbLayer and dataLayer
17
- const w = window as unknown as Record<string, unknown | unknown[]>;
17
+ const w = window;
18
18
  w.elbLayer = undefined;
19
19
  w.dataLayer = [];
20
- (w.dataLayer as unknown[]).push = mockDataLayer;
20
+ w.dataLayer.push = mockDataLayer;
21
21
 
22
22
  // Performance
23
23
  global.performance.getEntriesByType = jest
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@walkeros/config",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
+ "type": "module",
4
5
  "description": "Shared development configuration for walkerOS packages (TypeScript, ESLint, Jest, tsup)",
5
6
  "license": "MIT",
6
7
  "files": [
7
8
  "tsconfig/**/*.json",
8
9
  "eslint/**/*.mjs",
9
10
  "jest/**/*.mjs",
10
- "jest/**/*.ts",
11
11
  "tsup/**/*.mjs",
12
12
  "tsup/**/*.d.ts"
13
13
  ],
@@ -21,8 +21,8 @@
21
21
  "./jest": "./jest/index.mjs",
22
22
  "./jest/web.config": "./jest/web.config.mjs",
23
23
  "./jest/node.config": "./jest/node.config.mjs",
24
- "./jest/web.setup": "./jest/web.setup.ts",
25
- "./jest/node.setup": "./jest/node.setup.ts",
24
+ "./jest/web.setup": "./jest/web.setup.mjs",
25
+ "./jest/node.setup": "./jest/node.setup.mjs",
26
26
  "./tsup": "./tsup/index.mjs"
27
27
  },
28
28
  "dependencies": {