@jsenv/test 3.7.13 → 3.7.14
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/dist/jsenv_test.js
CHANGED
|
@@ -4121,13 +4121,13 @@ const applyPackageResolve = (packageSpecifier, resolutionContext) => {
|
|
|
4121
4121
|
: resolvePackageSymlink(packageDirectoryFacadeUrl);
|
|
4122
4122
|
const packageJson = readPackageJson(packageDirectoryUrl);
|
|
4123
4123
|
if (packageJson !== null) {
|
|
4124
|
-
const { exports } = packageJson;
|
|
4125
|
-
if (exports !== null && exports !== undefined) {
|
|
4124
|
+
const { exports: exports$1 } = packageJson;
|
|
4125
|
+
if (exports$1 !== null && exports$1 !== undefined) {
|
|
4126
4126
|
return applyPackageExportsResolution(packageSubpath, {
|
|
4127
4127
|
...resolutionContext,
|
|
4128
4128
|
packageDirectoryUrl,
|
|
4129
4129
|
packageJson,
|
|
4130
|
-
exports,
|
|
4130
|
+
exports: exports$1,
|
|
4131
4131
|
});
|
|
4132
4132
|
}
|
|
4133
4133
|
}
|
|
@@ -4154,8 +4154,8 @@ const applyPackageSelfResolution = (packageSubpath, resolutionContext) => {
|
|
|
4154
4154
|
if (packageJson.name !== packageName) {
|
|
4155
4155
|
return undefined;
|
|
4156
4156
|
}
|
|
4157
|
-
const { exports } = packageJson;
|
|
4158
|
-
if (!exports) {
|
|
4157
|
+
const { exports: exports$1 } = packageJson;
|
|
4158
|
+
if (!exports$1) {
|
|
4159
4159
|
const subpathResolution = applyLegacySubpathResolution(packageSubpath, {
|
|
4160
4160
|
...resolutionContext,
|
|
4161
4161
|
packageDirectoryUrl,
|
|
@@ -684,6 +684,7 @@ const ESC = '\u001B[';
|
|
|
684
684
|
|
|
685
685
|
!isBrowser && process.env.TERM_PROGRAM === 'Apple_Terminal';
|
|
686
686
|
const isWindows = !isBrowser && process.platform === 'win32';
|
|
687
|
+
!isBrowser && (process.env.TERM?.startsWith('screen') || process.env.TERM?.startsWith('tmux') || process.env.TMUX !== undefined);
|
|
687
688
|
|
|
688
689
|
isBrowser ? () => {
|
|
689
690
|
throw new Error('`process.cwd()` only works in Node.js, not the browser.');
|
|
@@ -709,13 +710,33 @@ const eraseLines = count => {
|
|
|
709
710
|
const eraseLine = ESC + '2K';
|
|
710
711
|
const eraseScreen = ESC + '2J';
|
|
711
712
|
|
|
712
|
-
const
|
|
713
|
+
const isOldWindows = () => {
|
|
714
|
+
if (isBrowser || !isWindows) {
|
|
715
|
+
return false;
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
const parts = os.release().split('.');
|
|
719
|
+
const major = Number(parts[0]);
|
|
720
|
+
const build = Number(parts[2] ?? 0);
|
|
721
|
+
|
|
722
|
+
if (major < 10) {
|
|
723
|
+
return true;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
if (major === 10 && build < 10_586) {
|
|
727
|
+
return true;
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
return false;
|
|
731
|
+
};
|
|
732
|
+
|
|
733
|
+
const clearTerminal = isOldWindows()
|
|
713
734
|
? `${eraseScreen}${ESC}0f`
|
|
714
735
|
// 1. Erases the screen (Only done in case `2` is not supported)
|
|
715
736
|
// 2. Erases the whole screen including scrollback buffer
|
|
716
737
|
// 3. Moves cursor to the top-left position
|
|
717
738
|
// More info: https://www.real-world-systems.com/docs/ANSIcode.html
|
|
718
|
-
:
|
|
739
|
+
: `${eraseScreen}${ESC}3J${ESC}H`;
|
|
719
740
|
|
|
720
741
|
function createRawFrame(raw) {
|
|
721
742
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsenv/test",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.14",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/jsenv/core",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@c88/v8-coverage": "0.1.1",
|
|
38
|
-
"@jsenv/ast": "6.7.
|
|
39
|
-
"@jsenv/plugin-supervisor": "1.7.
|
|
40
|
-
"@jsenv/sourcemap": "1.3.
|
|
38
|
+
"@jsenv/ast": "6.7.16",
|
|
39
|
+
"@jsenv/plugin-supervisor": "1.7.10",
|
|
40
|
+
"@jsenv/sourcemap": "1.3.12",
|
|
41
41
|
"he": "1.2.0",
|
|
42
42
|
"istanbul-lib-coverage": "3.2.2",
|
|
43
43
|
"istanbul-lib-instrument": "6.0.3",
|