mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-02-21 07:29:37 +01:00
rollback yaml support old nodejs versions (#3610)
This commit is contained in:
parent
a931cb6646
commit
d167f92e18
6
.changeset/giant-years-trade.md
Normal file
6
.changeset/giant-years-trade.md
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
'@verdaccio/test-cli-commons': minor
|
||||
'@verdaccio/config': minor
|
||||
---
|
||||
|
||||
chore: rollback yaml dep support old nodejs versions
|
@ -9,7 +9,7 @@
|
||||
"@verdaccio/core": "workspace:6.0.0-6-next.60",
|
||||
"@verdaccio/config": "workspace:6.0.0-6-next.60",
|
||||
"@verdaccio/types": "workspace:11.0.0-6-next.20",
|
||||
"yaml": "2.2.0",
|
||||
"js-yaml": "4.1.0",
|
||||
"debug": "4.3.4",
|
||||
"fs-extra": "10.1.0",
|
||||
"got": "11.8.6",
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { cp, writeFile } from 'fs/promises';
|
||||
import YAML from 'js-yaml';
|
||||
import { join } from 'path';
|
||||
import { URL } from 'url';
|
||||
import YAML from 'yaml';
|
||||
|
||||
import { Dependencies } from '@verdaccio/types';
|
||||
|
||||
@ -25,7 +25,7 @@ export function createYamlConfig(registry: string, token?: string) {
|
||||
};
|
||||
}
|
||||
|
||||
return YAML.stringify(defaultYaml);
|
||||
return YAML.dump(defaultYaml);
|
||||
}
|
||||
|
||||
export async function prepareYarnModernProject(
|
||||
|
@ -41,7 +41,7 @@
|
||||
"@verdaccio/core": "workspace:6.0.0-6-next.60",
|
||||
"@verdaccio/utils": "workspace:6.0.0-6-next.28",
|
||||
"debug": "4.3.4",
|
||||
"yaml": "2.2.0",
|
||||
"js-yaml": "4.1.0",
|
||||
"lodash": "4.17.21",
|
||||
"minimatch": "3.1.2",
|
||||
"yup": "0.32.11"
|
||||
|
@ -1,7 +1,7 @@
|
||||
import buildDebug from 'debug';
|
||||
import fs from 'fs';
|
||||
import YAML from 'js-yaml';
|
||||
import { isObject } from 'lodash';
|
||||
import YAML from 'yaml';
|
||||
|
||||
import { APP_ERROR } from '@verdaccio/core';
|
||||
import { ConfigYaml } from '@verdaccio/types';
|
||||
@ -26,7 +26,7 @@ export function parseConfigFile(configPath: string): ConfigYaml & {
|
||||
debug('parsing config file: %o', configPath);
|
||||
try {
|
||||
if (/\.ya?ml$/i.test(configPath)) {
|
||||
const yamlConfig = YAML.parse(fs.readFileSync(configPath, 'utf8'), {
|
||||
const yamlConfig = YAML.load(fs.readFileSync(configPath, 'utf8'), {
|
||||
strict: false,
|
||||
}) as ConfigYaml;
|
||||
|
||||
@ -56,7 +56,7 @@ export function parseConfigFile(configPath: string): ConfigYaml & {
|
||||
export function fromJStoYAML(config: Partial<ConfigYaml>): string | null {
|
||||
debug('convert config from JSON to YAML');
|
||||
if (isObject(config)) {
|
||||
return YAML.stringify(config);
|
||||
return YAML.dump(config);
|
||||
} else {
|
||||
throw new Error(`config is not a valid object`);
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ uplinks:
|
||||
npmjs:
|
||||
url: http://localhost:4873/
|
||||
packages:
|
||||
"@*/*":
|
||||
'@*/*':
|
||||
access: $all
|
||||
publish: $all
|
||||
proxy: npmjs
|
||||
@ -32,7 +32,7 @@ packages:
|
||||
access: $authenticated
|
||||
publish: $authenticated
|
||||
proxy: npmjs
|
||||
"*":
|
||||
'*':
|
||||
access: $all
|
||||
publish: $all
|
||||
proxy: npmjs
|
||||
|
504
pnpm-lock.yaml
generated
504
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user