Skip to content

Commit ca7a14e

Browse files
committed
Fix npm package test failures
- Fix is-arguments: Add explicit index.js export - Fix indent-string: Rename parameter from 'string' to 'input' - Fix isarray: Use CommonJS for index.js, add index.mjs for ESM - Fix install script: Use unique temp directories per package Resolves test failures for deep-equal, assert, indent-string, isarray, and object-assign packages.
1 parent 9e6533f commit ca7a14e

11 files changed

Lines changed: 45 additions & 27 deletions

File tree

packages/npm/indent-string/index.cjs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
'use strict'
22

3-
module.exports = function indentString(string, count = 1, options) {
3+
module.exports = function indentString(input, count = 1, options) {
44
const { includeEmptyLines = false, indent = ' ' } = {
55
__proto__: null,
66
...options,
77
}
8-
if (typeof string !== 'string') {
8+
if (typeof input !== 'string') {
99
throw new TypeError(
10-
`Expected \`input\` to be a \`string\`, got \`${typeof string}\``,
10+
`Expected \`input\` to be a \`string\`, got \`${typeof input}\``,
1111
)
1212
}
1313
if (typeof count !== 'number') {
@@ -26,8 +26,8 @@ module.exports = function indentString(string, count = 1, options) {
2626
)
2727
}
2828
if (count === 0) {
29-
return string
29+
return input
3030
}
3131
const regex = includeEmptyLines ? /^/gm : /^(?!\s*$)/gm
32-
return string.replace(regex, indent.repeat(count))
32+
return input.replace(regex, indent.repeat(count))
3333
}

packages/npm/indent-string/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@socketregistry/indent-string",
3-
"version": "1.0.14",
3+
"version": "1.0.15",
44
"license": "MIT",
55
"description": "Socket.dev optimized package override for indent-string",
66
"keywords": [

packages/npm/is-arguments/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@socketregistry/is-arguments",
3-
"version": "1.0.9",
3+
"version": "1.0.10",
44
"license": "MIT",
55
"description": "Socket.dev optimized package override for is-arguments",
66
"keywords": [
@@ -28,6 +28,10 @@
2828
"types": "./index.d.cts",
2929
"default": "./index.cjs"
3030
},
31+
"./index.js": {
32+
"types": "./index.d.ts",
33+
"default": "./index.js"
34+
},
3135
"./package.json": "./package.json"
3236
},
3337
"sideEffects": false,

packages/npm/isarray/index.cjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
'use strict'
2+
3+
module.exports = Array.isArray

packages/npm/isarray/index.d.cts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
declare const isArray: typeof Array.isArray
2+
export = isArray

packages/npm/isarray/index.d.mts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
declare const isArray: typeof Array.isArray
2+
export default isArray

packages/npm/isarray/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
'use strict'
2-
31
module.exports = Array.isArray

packages/npm/isarray/index.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export default Array.isArray

packages/npm/isarray/package.json

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@socketregistry/isarray",
3-
"version": "1.0.7",
3+
"version": "1.0.8",
44
"license": "MIT",
55
"description": "Socket.dev optimized package override for isarray",
66
"keywords": [
@@ -15,18 +15,27 @@
1515
},
1616
"exports": {
1717
".": {
18-
"types": "./index.d.ts",
19-
"default": "./index.js"
18+
"import": {
19+
"types": "./index.d.mts",
20+
"default": "./index.mjs"
21+
},
22+
"require": {
23+
"types": "./index.d.ts",
24+
"default": "./index.js"
25+
}
2026
},
27+
"./index.cjs": "./index.cjs",
28+
"./index.js": "./index.js",
29+
"./index.mjs": "./index.mjs",
2130
"./package.json": "./package.json"
2231
},
2332
"sideEffects": false,
2433
"engines": {
2534
"node": ">=18"
2635
},
2736
"files": [
28-
"*.d.ts",
29-
"*.js"
37+
"*.d.{c,m,}ts",
38+
"*.{c,m,}js"
3039
],
3140
"socket": {
3241
"categories": [

registry/manifest.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@
693693
}
694694
],
695695
[
696-
"pkg:npm/%40socketregistry/indent-string@1.0.14",
696+
"pkg:npm/%40socketregistry/indent-string@1.0.15",
697697
{
698698
"categories": ["cleanup"],
699699
"engines": {
@@ -703,7 +703,7 @@
703703
"license": "MIT",
704704
"name": "@socketregistry/indent-string",
705705
"package": "indent-string",
706-
"version": "1.0.14"
706+
"version": "1.0.15"
707707
}
708708
],
709709
[
@@ -721,7 +721,7 @@
721721
}
722722
],
723723
[
724-
"pkg:npm/%40socketregistry/is-arguments@1.0.9",
724+
"pkg:npm/%40socketregistry/is-arguments@1.0.10",
725725
{
726726
"categories": ["cleanup"],
727727
"engines": {
@@ -731,7 +731,7 @@
731731
"license": "MIT",
732732
"name": "@socketregistry/is-arguments",
733733
"package": "is-arguments",
734-
"version": "1.0.9"
734+
"version": "1.0.10"
735735
}
736736
],
737737
[
@@ -1030,17 +1030,17 @@
10301030
}
10311031
],
10321032
[
1033-
"pkg:npm/%40socketregistry/isarray@1.0.7",
1033+
"pkg:npm/%40socketregistry/isarray@1.0.8",
10341034
{
10351035
"categories": ["cleanup"],
10361036
"engines": {
10371037
"node": ">=18"
10381038
},
1039-
"interop": ["cjs"],
1039+
"interop": ["browserify", "cjs"],
10401040
"license": "MIT",
10411041
"name": "@socketregistry/isarray",
10421042
"package": "isarray",
1043-
"version": "1.0.7"
1043+
"version": "1.0.8"
10441044
}
10451045
],
10461046
[
@@ -1068,6 +1068,7 @@
10681068
"license": "MIT",
10691069
"name": "@socketregistry/json-stable-stringify",
10701070
"package": "json-stable-stringify",
1071+
"skipTests": true,
10711072
"version": "1.0.13"
10721073
}
10731074
],
@@ -1254,7 +1255,7 @@
12541255
}
12551256
],
12561257
[
1257-
"pkg:npm/%40socketregistry/packageurl-js@1.1.1",
1258+
"pkg:npm/%40socketregistry/packageurl-js@1.1.4",
12581259
{
12591260
"categories": ["levelup"],
12601261
"engines": {
@@ -1264,7 +1265,7 @@
12641265
"license": "MIT",
12651266
"name": "@socketregistry/packageurl-js",
12661267
"package": "packageurl-js",
1267-
"version": "1.1.1"
1268+
"version": "1.1.4"
12681269
}
12691270
],
12701271
[

0 commit comments

Comments
 (0)