@yarn-tool/static-file 2.0.1 → 2.0.2
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 +11 -0
- package/file/gitignore +3 -0
- package/file/jest.config.js +50 -1
- package/file/npmignore +8 -0
- package/file/test/__root.d.ts +1 -1
- package/file/test/__root.js +2 -2
- package/file/test/__root.js.map +1 -1
- package/file/test/__root.ts +1 -1
- package/file/ws-root/__root_ws.d.ts +1 -1
- package/file/ws-root/__root_ws.js +2 -2
- package/file/ws-root/__root_ws.js.map +1 -1
- package/file/ws-root/__root_ws.ts +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.0.2](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/static-file@2.0.1...@yarn-tool/static-file@2.0.2) (2022-07-31)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### ✨ Features
|
|
10
|
+
|
|
11
|
+
* update static files ([2da4c65](https://github.com/bluelovers/ws-yarn-workspaces/commit/2da4c65772856fa729bee66893dd4e347f7ede05))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [2.0.1](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/static-file@2.0.0...@yarn-tool/static-file@2.0.1) (2022-07-11)
|
|
7
18
|
|
|
8
19
|
|
package/file/gitignore
CHANGED
package/file/jest.config.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
|
|
3
|
+
const { join } = require('path');
|
|
4
|
+
const { tryRealpath } = require('jest-util');
|
|
5
|
+
const { tmpdir } = require('os');
|
|
6
|
+
|
|
3
7
|
/**
|
|
4
8
|
* @param {string} name
|
|
5
9
|
* @returns {string}
|
|
@@ -37,6 +41,27 @@ function _requireResolve(name)
|
|
|
37
41
|
return result
|
|
38
42
|
}
|
|
39
43
|
|
|
44
|
+
/**
|
|
45
|
+
* @returns {string}
|
|
46
|
+
* @see https://github.com/facebook/jest/blob/main/packages/jest-config/src/getCacheDirectory.ts
|
|
47
|
+
*/
|
|
48
|
+
function getCacheDirectory()
|
|
49
|
+
{
|
|
50
|
+
const { getuid } = process;
|
|
51
|
+
const tmpdirPath = process.env['JEST_CACHE_DIRECTORY'] || join(tryRealpath(tmpdir()), 'jest');
|
|
52
|
+
if (getuid == null)
|
|
53
|
+
{
|
|
54
|
+
return tmpdirPath;
|
|
55
|
+
}
|
|
56
|
+
else
|
|
57
|
+
{
|
|
58
|
+
// On some platforms tmpdir() is `/tmp`, causing conflicts between different
|
|
59
|
+
// users and permission issues. Adding an additional subdivision by UID can
|
|
60
|
+
// help.
|
|
61
|
+
return `${tmpdirPath}_${getuid.call(process).toString(36)}`;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
40
65
|
const testExt = [
|
|
41
66
|
'ts',
|
|
42
67
|
'tsx',
|
|
@@ -48,20 +73,24 @@ const testExt = [
|
|
|
48
73
|
// 'cjs',
|
|
49
74
|
].join('|');
|
|
50
75
|
|
|
76
|
+
const cacheDirectory = getCacheDirectory();
|
|
77
|
+
|
|
51
78
|
console.info(`jest.config`);
|
|
52
79
|
console.info(`- file: ${__filename}`);
|
|
53
80
|
console.info(`- cwd: ${process.cwd()}`);
|
|
81
|
+
console.info(`- cacheDirectory: ${cacheDirectory}`);
|
|
54
82
|
|
|
55
83
|
/**
|
|
56
84
|
* // @type { import('@jest/types').Config.InitialOptions }
|
|
57
85
|
* @type { import('ts-jest').InitialOptionsTsJest }
|
|
58
86
|
*/
|
|
59
|
-
|
|
87
|
+
const jestConfig = {
|
|
60
88
|
globals: {
|
|
61
89
|
'ts-jest': {
|
|
62
90
|
//tsconfig: 'tsconfig.spec.json',
|
|
63
91
|
},
|
|
64
92
|
},
|
|
93
|
+
cacheDirectory,
|
|
65
94
|
maxWorkers: 1,
|
|
66
95
|
clearMocks: true,
|
|
67
96
|
passWithNoTests: true,
|
|
@@ -91,6 +120,7 @@ module.exports = {
|
|
|
91
120
|
'/__tests__/helpers/',
|
|
92
121
|
'/__tests__/utils/',
|
|
93
122
|
'__mocks__',
|
|
123
|
+
'/dist/',
|
|
94
124
|
],
|
|
95
125
|
//testRunner: 'jest-circus/runner',
|
|
96
126
|
setupFilesAfterEnv: [
|
|
@@ -118,12 +148,31 @@ module.exports = {
|
|
|
118
148
|
'/node_modules/',
|
|
119
149
|
'/__snapshots__/',
|
|
120
150
|
'/__tests__/',
|
|
151
|
+
'/__test__/',
|
|
121
152
|
//'**/node_modules/',
|
|
122
153
|
//'**/__snapshots__/',
|
|
123
154
|
//'**/__tests__/',
|
|
155
|
+
'/dist/',
|
|
156
|
+
'/test/',
|
|
157
|
+
'/fixture/',
|
|
124
158
|
],
|
|
125
159
|
/**
|
|
126
160
|
* https://github.com/facebook/jest/issues/9771#issuecomment-872764344
|
|
127
161
|
*/
|
|
128
162
|
//resolver: 'jest-node-exports-resolver',
|
|
129
163
|
}
|
|
164
|
+
|
|
165
|
+
try
|
|
166
|
+
{
|
|
167
|
+
let result = require.resolve('@bluelovers/jest-config');
|
|
168
|
+
if (result && !jestConfig.preset)
|
|
169
|
+
{
|
|
170
|
+
jestConfig.preset = result;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
catch (e)
|
|
174
|
+
{
|
|
175
|
+
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
module.exports = jestConfig
|
package/file/npmignore
CHANGED
|
@@ -35,12 +35,18 @@ node_modules
|
|
|
35
35
|
/bin/**/*.d.cts
|
|
36
36
|
/bin/*.d.cts
|
|
37
37
|
|
|
38
|
+
!./src/**/*.ts
|
|
39
|
+
!./src/**/*.cts
|
|
40
|
+
!./src/**/*.mts
|
|
41
|
+
!./src/**/*.tsx
|
|
42
|
+
|
|
38
43
|
/src/**/*.d.ts
|
|
39
44
|
/src/**/*.js
|
|
40
45
|
/src/**/*.d.cts
|
|
41
46
|
/src/**/*.d.mts
|
|
42
47
|
/src/**/*.cjs
|
|
43
48
|
/src/**/*.mjs
|
|
49
|
+
/src/**/*.jsx
|
|
44
50
|
|
|
45
51
|
*.tgz
|
|
46
52
|
/tsconfig.json.tpl
|
|
@@ -99,7 +105,9 @@ now.json
|
|
|
99
105
|
*.spec.mjs
|
|
100
106
|
*.spec.mts
|
|
101
107
|
|
|
108
|
+
*.spec.d.tsx
|
|
102
109
|
*.spec.tsx
|
|
110
|
+
|
|
103
111
|
__mocks__
|
|
104
112
|
__tests__
|
|
105
113
|
__snapshots__
|
package/file/test/__root.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const __ROOT: string;
|
|
2
2
|
export declare const isWin: boolean;
|
package/file/test/__root.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isWin = exports.
|
|
3
|
+
exports.isWin = exports.__ROOT = void 0;
|
|
4
4
|
const path_1 = require("path");
|
|
5
|
-
exports.
|
|
5
|
+
exports.__ROOT = (0, path_1.join)(__dirname, '..');
|
|
6
6
|
exports.isWin = process.platform === "win32";
|
|
7
7
|
//# sourceMappingURL=__root.js.map
|
package/file/test/__root.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"__root.js","sourceRoot":"","sources":["__root.ts"],"names":[],"mappings":";;;AAAA,+BAA4B;AAEf,QAAA,MAAM,GAAG,IAAA,WAAI,EAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAE/B,QAAA,KAAK,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC","sourcesContent":["import { join } from \"path\";\n\nexport const
|
|
1
|
+
{"version":3,"file":"__root.js","sourceRoot":"","sources":["__root.ts"],"names":[],"mappings":";;;AAAA,+BAA4B;AAEf,QAAA,MAAM,GAAG,IAAA,WAAI,EAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAE/B,QAAA,KAAK,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC","sourcesContent":["import { join } from \"path\";\n\nexport const __ROOT = join(__dirname, '..');\n\nexport const isWin = process.platform === \"win32\";\n"]}
|
package/file/test/__root.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const __ROOT_WS: string;
|
|
2
2
|
export declare const isWin: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isWin = exports.
|
|
3
|
+
exports.isWin = exports.__ROOT_WS = void 0;
|
|
4
4
|
const path_1 = require("path");
|
|
5
|
-
exports.
|
|
5
|
+
exports.__ROOT_WS = (0, path_1.join)(__dirname);
|
|
6
6
|
exports.isWin = process.platform === "win32";
|
|
7
7
|
//# sourceMappingURL=__root_ws.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"__root_ws.js","sourceRoot":"","sources":["__root_ws.ts"],"names":[],"mappings":";;;AAAA,+BAA4B;AAEf,QAAA,SAAS,GAAG,IAAA,WAAI,EAAC,SAAS,CAAC,CAAC;AAE5B,QAAA,KAAK,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC","sourcesContent":["import { join } from \"path\";\n\nexport const
|
|
1
|
+
{"version":3,"file":"__root_ws.js","sourceRoot":"","sources":["__root_ws.ts"],"names":[],"mappings":";;;AAAA,+BAA4B;AAEf,QAAA,SAAS,GAAG,IAAA,WAAI,EAAC,SAAS,CAAC,CAAC;AAE5B,QAAA,KAAK,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC","sourcesContent":["import { join } from \"path\";\n\nexport const __ROOT_WS = join(__dirname);\n\nexport const isWin = process.platform === \"win32\";\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yarn-tool/static-file",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"homepage": "https://github.com/bluelovers/ws-yarn-workspaces/tree/master/packages/@yarn-tool/static-file#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "ff2ab47cbd966bfa7f8eca7378e29571c1b53c1c"
|
|
35
35
|
}
|