com.jimuwd.xian.registry-proxy 1.1.25 → 1.1.26

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.
@@ -140,11 +140,13 @@ async function startLocalRegistryProxyServerAndYarnInstallWithoutCleanup() {
140
140
  const npmRegistryServer = (exitCode === 0 && stdout) ? stdout.trim() : undefined;
141
141
  const localNpmRegistryServer = (await readYarnConfig('.yarnrc.yml')).npmRegistryServer?.trim();
142
142
  if (localNpmRegistryServer && localNpmRegistryServer === npmRegistryServer)
143
- console.log(`Using npmRegistryServer value in project local .yarnrc.yml: ${localNpmRegistryServer}`);
143
+ console.log(`NpmRegistryServer value in project local .yarnrc.yml: ${localNpmRegistryServer}`);
144
144
  else
145
- console.log(`Using npmRegistryServer value in ${path.join(process.env.HOME || '', '.yarnrc.yml')}: ${npmRegistryServer}`);
145
+ console.log(`NpmRegistryServer value in ${path.join(process.env.HOME || '', '.yarnrc.yml')}: ${npmRegistryServer}`);
146
146
  await execa('yarn', ['config', 'set', 'npmRegistryServer', `http://127.0.0.1:${PROXY_PORT}`]);
147
- console.log(`Set npmRegistryServer to http://127.0.0.1:${PROXY_PORT}`);
147
+ console.log(`Set npmRegistryServer config value to http://127.0.0.1:${PROXY_PORT}`);
148
+ console.log('Read npmRegistryServer after set using yarn config get cmd:', (await execa('yarn', ['config', 'get', 'npmRegistryServer'])).stdout);
149
+ console.log('Read npmRegistryServer after set using reading .yarnrc.yml file:', (await readYarnConfig('.yarnrc.yml')).npmRegistryServer?.trim());
148
150
  registerCleanup(async () => {
149
151
  try {
150
152
  //if (npmRegistryServer) {//不能用这个变量来恢复为原来的 npmRegistryServer,因为它可能是全局配置~/.yarnrc.yml内的配置值或yarn工具官方默认值,而非本地.yarnrc.yml配置值。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "com.jimuwd.xian.registry-proxy",
3
- "version": "1.1.25",
3
+ "version": "1.1.26",
4
4
  "description": "A lightweight npm registry local proxy with fallback support",
5
5
  "type": "module",
6
6
  "main": "dist/server/index.js",
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "execa": "9.5.2",
21
- "js-yaml": "4.1.0",
21
+ "js-yaml": "4.1.1",
22
22
  "node-fetch": "3.3.2"
23
23
  },
24
24
  "devDependencies": {