@websolutespa/test 0.1.0 → 1.7.0
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 +38 -25
- package/dist/index.d.ts +2 -1
- package/dist/index.js +53 -0
- package/dist/index.mjs +59 -0
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,25 +1,38 @@
|
|
|
1
|
-
# @websolutespa/test
|
|
2
|
-
|
|
3
|
-
##
|
|
4
|
-
|
|
5
|
-
### Minor Changes
|
|
6
|
-
|
|
7
|
-
- Updating:
|
|
8
|
-
|
|
9
|
-
## 0.
|
|
10
|
-
|
|
11
|
-
### Patch Changes
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
1
|
+
# @websolutespa/test
|
|
2
|
+
|
|
3
|
+
## 1.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 28e86bd: Updating: dependencies
|
|
8
|
+
|
|
9
|
+
## 0.1.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 11b63e3b: Fixed test config
|
|
14
|
+
- c7a99a2b: Updated test config
|
|
15
|
+
|
|
16
|
+
## 0.1.0
|
|
17
|
+
|
|
18
|
+
### Minor Changes
|
|
19
|
+
|
|
20
|
+
- Updating: next 13.
|
|
21
|
+
|
|
22
|
+
## 0.0.4
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- Added: js, jsx support.
|
|
27
|
+
|
|
28
|
+
## 0.0.3
|
|
29
|
+
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- Fixing: package.json.
|
|
33
|
+
|
|
34
|
+
## 0.0.2
|
|
35
|
+
|
|
36
|
+
### Patch Changes
|
|
37
|
+
|
|
38
|
+
- Added: first release.
|
package/dist/index.d.ts
CHANGED
|
@@ -4,5 +4,6 @@ declare const baseConfig: Config;
|
|
|
4
4
|
declare function getProjectConfig(): {};
|
|
5
5
|
declare function getAppConfig(): {};
|
|
6
6
|
declare function getPackageConfig(): {};
|
|
7
|
+
declare function getPayloadConfig(): {};
|
|
7
8
|
|
|
8
|
-
export { baseConfig, getAppConfig, getPackageConfig, getProjectConfig };
|
|
9
|
+
export { baseConfig, getAppConfig, getPackageConfig, getPayloadConfig, getProjectConfig };
|
package/dist/index.js
CHANGED
|
@@ -50,6 +50,7 @@ __export(test_exports, {
|
|
|
50
50
|
baseConfig: () => baseConfig,
|
|
51
51
|
getAppConfig: () => getAppConfig,
|
|
52
52
|
getPackageConfig: () => getPackageConfig,
|
|
53
|
+
getPayloadConfig: () => getPayloadConfig,
|
|
53
54
|
getProjectConfig: () => getProjectConfig
|
|
54
55
|
});
|
|
55
56
|
module.exports = __toCommonJS(test_exports);
|
|
@@ -198,10 +199,62 @@ function getPackageConfig() {
|
|
|
198
199
|
});
|
|
199
200
|
return config;
|
|
200
201
|
}
|
|
202
|
+
function getPayloadConfig() {
|
|
203
|
+
const cwd = process.cwd();
|
|
204
|
+
const config = __spreadProps(__spreadValues({}, baseConfig), {
|
|
205
|
+
// testEnvironment: '<rootDir>/jest.environment.ts',
|
|
206
|
+
testEnvironment: "node",
|
|
207
|
+
testTimeout: 2e4,
|
|
208
|
+
verbose: true,
|
|
209
|
+
silent: true,
|
|
210
|
+
rootDir: ".",
|
|
211
|
+
roots: [
|
|
212
|
+
`${cwd}`
|
|
213
|
+
],
|
|
214
|
+
modulePaths: [
|
|
215
|
+
`${cwd}/src/`
|
|
216
|
+
],
|
|
217
|
+
moduleDirectories: [
|
|
218
|
+
"node_modules"
|
|
219
|
+
],
|
|
220
|
+
testMatch: [
|
|
221
|
+
"<rootDir>/src/**/*(?<!e2e).test.{js,jsx,ts,tsx}"
|
|
222
|
+
],
|
|
223
|
+
coverageDirectory: `${cwd}/coverage`,
|
|
224
|
+
collectCoverageFrom: [
|
|
225
|
+
"<rootDir>/src/**/*(?<!test).{js,jsx,ts,tsx}"
|
|
226
|
+
],
|
|
227
|
+
reporters: ["default", "github-actions"],
|
|
228
|
+
coverageReporters: ["html", "text", "text-summary", "lcov"],
|
|
229
|
+
transform: {
|
|
230
|
+
"^.+\\.(js|jsx|ts|tsx)?$": ["@swc/jest", {
|
|
231
|
+
jsc: {
|
|
232
|
+
transform: {
|
|
233
|
+
react: {
|
|
234
|
+
runtime: "automatic"
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}]
|
|
239
|
+
},
|
|
240
|
+
modulePathIgnorePatterns: [
|
|
241
|
+
"<rootDir>/build/"
|
|
242
|
+
],
|
|
243
|
+
transformIgnorePatterns: ["node_modules/(?!swiper)/"],
|
|
244
|
+
moduleNameMapper: {
|
|
245
|
+
// Force module uuid to resolve with the CJS entry point, because Jest does not support package.json.exports. See https://github.com/uuidjs/uuid/issues/451
|
|
246
|
+
"uuid": require.resolve("uuid"),
|
|
247
|
+
"\\.(css|scss)$": "identity-obj-proxy",
|
|
248
|
+
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/jest.mock.file.js"
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
return config;
|
|
252
|
+
}
|
|
201
253
|
// Annotate the CommonJS export names for ESM import in node:
|
|
202
254
|
0 && (module.exports = {
|
|
203
255
|
baseConfig,
|
|
204
256
|
getAppConfig,
|
|
205
257
|
getPackageConfig,
|
|
258
|
+
getPayloadConfig,
|
|
206
259
|
getProjectConfig
|
|
207
260
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -17,6 +17,13 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
21
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
22
|
+
}) : x)(function(x) {
|
|
23
|
+
if (typeof require !== "undefined")
|
|
24
|
+
return require.apply(this, arguments);
|
|
25
|
+
throw new Error('Dynamic require of "' + x + '" is not supported');
|
|
26
|
+
});
|
|
20
27
|
|
|
21
28
|
// index.ts
|
|
22
29
|
import nextJest from "next/jest";
|
|
@@ -164,9 +171,61 @@ function getPackageConfig() {
|
|
|
164
171
|
});
|
|
165
172
|
return config;
|
|
166
173
|
}
|
|
174
|
+
function getPayloadConfig() {
|
|
175
|
+
const cwd = process.cwd();
|
|
176
|
+
const config = __spreadProps(__spreadValues({}, baseConfig), {
|
|
177
|
+
// testEnvironment: '<rootDir>/jest.environment.ts',
|
|
178
|
+
testEnvironment: "node",
|
|
179
|
+
testTimeout: 2e4,
|
|
180
|
+
verbose: true,
|
|
181
|
+
silent: true,
|
|
182
|
+
rootDir: ".",
|
|
183
|
+
roots: [
|
|
184
|
+
`${cwd}`
|
|
185
|
+
],
|
|
186
|
+
modulePaths: [
|
|
187
|
+
`${cwd}/src/`
|
|
188
|
+
],
|
|
189
|
+
moduleDirectories: [
|
|
190
|
+
"node_modules"
|
|
191
|
+
],
|
|
192
|
+
testMatch: [
|
|
193
|
+
"<rootDir>/src/**/*(?<!e2e).test.{js,jsx,ts,tsx}"
|
|
194
|
+
],
|
|
195
|
+
coverageDirectory: `${cwd}/coverage`,
|
|
196
|
+
collectCoverageFrom: [
|
|
197
|
+
"<rootDir>/src/**/*(?<!test).{js,jsx,ts,tsx}"
|
|
198
|
+
],
|
|
199
|
+
reporters: ["default", "github-actions"],
|
|
200
|
+
coverageReporters: ["html", "text", "text-summary", "lcov"],
|
|
201
|
+
transform: {
|
|
202
|
+
"^.+\\.(js|jsx|ts|tsx)?$": ["@swc/jest", {
|
|
203
|
+
jsc: {
|
|
204
|
+
transform: {
|
|
205
|
+
react: {
|
|
206
|
+
runtime: "automatic"
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}]
|
|
211
|
+
},
|
|
212
|
+
modulePathIgnorePatterns: [
|
|
213
|
+
"<rootDir>/build/"
|
|
214
|
+
],
|
|
215
|
+
transformIgnorePatterns: ["node_modules/(?!swiper)/"],
|
|
216
|
+
moduleNameMapper: {
|
|
217
|
+
// Force module uuid to resolve with the CJS entry point, because Jest does not support package.json.exports. See https://github.com/uuidjs/uuid/issues/451
|
|
218
|
+
"uuid": __require.resolve("uuid"),
|
|
219
|
+
"\\.(css|scss)$": "identity-obj-proxy",
|
|
220
|
+
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/jest.mock.file.js"
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
return config;
|
|
224
|
+
}
|
|
167
225
|
export {
|
|
168
226
|
baseConfig,
|
|
169
227
|
getAppConfig,
|
|
170
228
|
getPackageConfig,
|
|
229
|
+
getPayloadConfig,
|
|
171
230
|
getProjectConfig
|
|
172
231
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@websolutespa/test",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "Test shared config of the BOM Repository",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bom",
|
|
@@ -31,15 +31,18 @@
|
|
|
31
31
|
"jest": "^29.3.1"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"next": ">= 13.4.19"
|
|
34
|
+
"next": ">= 13.4.19",
|
|
35
|
+
"uuid": ">= 9.0.1"
|
|
35
36
|
},
|
|
36
37
|
"devDependencies": {
|
|
37
38
|
"@types/jest": "^29.2.4",
|
|
39
|
+
"@types/uuid": "^9.0.2",
|
|
38
40
|
"eslint-config-websolute": "*",
|
|
39
41
|
"npm-run-all": "^4.1.5",
|
|
40
42
|
"ts-node": "^10.9.1",
|
|
41
43
|
"tsup": "^6.7.0",
|
|
42
|
-
"typescript": "^5.1.6"
|
|
44
|
+
"typescript": "^5.1.6",
|
|
45
|
+
"uuid": "^9.0.1"
|
|
43
46
|
},
|
|
44
47
|
"publishConfig": {
|
|
45
48
|
"access": "public"
|