@trenskow/esbuild-package-json 0.1.0 → 0.1.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/index.js +2 -2
- package/package.json +5 -5
package/index.js
CHANGED
|
@@ -35,13 +35,13 @@ export default ({
|
|
|
35
35
|
|
|
36
36
|
const sourceContent = await readFile(source, 'utf8');
|
|
37
37
|
|
|
38
|
-
keyPaths = keyPaths || keyd(sourceContent).keyPaths();
|
|
39
|
-
|
|
40
38
|
const indentation = sourceContent.match(/^( +|\t)/m)
|
|
41
39
|
?.sort((a, b) => a.length - b.length)?.[0] || ' ';
|
|
42
40
|
|
|
43
41
|
const sourcePackageJson = JSON.parse(sourceContent);
|
|
44
42
|
|
|
43
|
+
keyPaths = keyPaths || keyd(sourcePackageJson).keyPaths();
|
|
44
|
+
|
|
45
45
|
const destinationPackageJson = Object.assign({}, keyPaths.reduce((accumulator, keyPath) => {
|
|
46
46
|
const value = keyd(sourcePackageJson).get(keyPath);
|
|
47
47
|
if (typeof value !== 'undefined') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trenskow/esbuild-package-json",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "A esbuild plugin for generating `package.json` files.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"esbuild",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"esbuild": "^0.27.
|
|
27
|
-
"keyd": "^2.1.
|
|
26
|
+
"esbuild": "^0.27.3",
|
|
27
|
+
"keyd": "^2.1.51"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@eslint/compat": "^2.0.2",
|
|
31
31
|
"@eslint/eslintrc": "^3.3.3",
|
|
32
|
-
"@eslint/js": "^
|
|
33
|
-
"eslint": "^
|
|
32
|
+
"@eslint/js": "^10.0.1",
|
|
33
|
+
"eslint": "^10.0.0",
|
|
34
34
|
"globals": "^17.3.0"
|
|
35
35
|
}
|
|
36
36
|
}
|