Skip to content

Commit b462c5d

Browse files
committed
Clean up package.json and updated platform.ts
1 parent 7509d56 commit b462c5d

File tree

4 files changed

+15
-10
lines changed

4 files changed

+15
-10
lines changed

ern-api-gen/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,5 @@
5252
},
5353
"devDependencies": {
5454
"ern-util-dev": "0.53.6"
55-
},
56-
"resolutions": {
57-
"path-loader": "1.0.10"
5855
}
5956
}

ern-core/src/Platform.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,20 @@ export default class Platform {
117117
if (this.isYarnInstalled()) {
118118
// Favor yarn if it is installed as it will greatly speed up install
119119
execSync(`yarn init --yes`, { cwd: pathToVersion });
120+
// Inject resolutions field into package.json
121+
const packageJsonPath = path.join(pathToVersion, 'package.json');
122+
if (fs.existsSync(packageJsonPath)) {
123+
const packageJson = JSON.parse(
124+
fs.readFileSync(packageJsonPath, 'utf-8'),
125+
);
126+
packageJson.resolutions = {
127+
'path-loader': '1.0.10',
128+
};
129+
fs.writeFileSync(
130+
packageJsonPath,
131+
JSON.stringify(packageJson, null, 2),
132+
);
133+
}
120134
execSync(
121135
`yarn add ${ERN_LOCAL_CLI_PACKAGE}@${version} --exact --ignore-engines`,
122136
{

ern-local-cli/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,5 @@
7777
},
7878
"engines": {
7979
"node": ">=12"
80-
},
81-
"resolutions": {
82-
"path-loader": "1.0.10"
8380
}
8481
}

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,5 @@
106106
},
107107
"workspaces": [
108108
"ern-*"
109-
],
110-
"resolutions": {
111-
"path-loader": "1.0.10"
112-
}
109+
]
113110
}

0 commit comments

Comments
 (0)