Skip to content

Commit

Permalink
Improve verdaccio setup
Browse files Browse the repository at this point in the history
  • Loading branch information
fortmarek committed Sep 14, 2022
1 parent 6dd7298 commit c97a465
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 42 deletions.
44 changes: 44 additions & 0 deletions .circleci/verdaccio.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
storage: ./storage
auth:
htpasswd:
file: ./htpasswd
uplinks:
npmjs:
url: https://registry.yarnpkg.com/
max_fails: 40
maxage: 30m
timeout: 60s
fail_timeout: 10m
cache: false
agent_options:
keepAlive: true
maxSockets: 40
maxFreeSockets: 10
packages:
# Group and isolate all local packages, avoid being proxy from outside
'@react-native/*':
access: $all
publish: $all
# The below specific entries can be removed once they are renamed and have the @react-native prefix
'@react-native-community/eslint-config':
access: $all
publish: $all
'@react-native-community/eslint-plugin':
access: $all
publish: $all
'react-native-codegen':
access: $all
publish: $all
'react-native-gradle-plugin':
access: $all
publish: $all
'@*/*':
access: $all
publish: $all
proxy: npmjs
'**':
access: $all
publish: $all
proxy: npmjs
logs:
- {type: file, path: verdaccio.log, format: json, level: warn}
27 changes: 0 additions & 27 deletions .circleci/verdaccio/config.yml

This file was deleted.

15 changes: 1 addition & 14 deletions scripts/run-ci-e2e-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ try {
const verdaccioProcess = spawn('npx', [
'verdaccio@5.15.3',
'--config',
'.circleci/verdaccio/config.yml',
'.circleci/verdaccio.yml',
]);
VERDACCIO_PID = verdaccioProcess.pid;
exec('npx wait-on@6.0.1 http://localhost:4873');
Expand All @@ -92,19 +92,6 @@ try {
packageName !== '@react-native/tester' &&
packageName !== '@react-native/repo-config',
)
.filter(packageName => {
const yarnInfo = exec(`yarn info ${packageName} --json`);
if (yarnInfo.stderr !== '') {
return true;
}
const versions = JSON.parse(
exec(`yarn info ${packageName} --json`).stdout.trim(),
).data.versions;
const currentVersion = require(`${process.cwd()}/${
packages[packageName].location
}/package.json`).version;
return !versions.includes(currentVersion);
})
.forEach(packageName => {
exec(
`cd ${packages[packageName].location} && npm publish --registry http://localhost:4873 --yes --access public`,
Expand Down
2 changes: 1 addition & 1 deletion template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"devDependencies": {
"@babel/core": "^7.12.9",
"@babel/runtime": "^7.12.5",
"@react-native-community/eslint-config": "^2.0.0",
"@react-native-community/eslint-config": "^3.0.0",
"babel-jest": "^26.6.3",
"eslint": "^8.19.0",
"jest": "^26.6.3",
Expand Down

0 comments on commit c97a465

Please sign in to comment.