Skip to content

Commit

Permalink
Merge pull request #146 from poap-xyz/use-yarn
Browse files Browse the repository at this point in the history
Use yarn
  • Loading branch information
jm42 authored Nov 27, 2024
2 parents 8d260e7 + aec87c4 commit f4cbadf
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 20 deletions.
6 changes: 3 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ for dir in "${DIRS[@]}"; do
fi

# Run the build command
if ! npm run build; then
echo "Error: Failed to run 'npm run build' in directory: packages/$dir"
if ! yarn build; then
echo "Error: Failed to run 'yarn build' in directory: packages/$dir"
exit 1
fi

Expand All @@ -22,4 +22,4 @@ for dir in "${DIRS[@]}"; do
echo "Error: Unable to change back to original directory"
exit 1
fi
done
done
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,8 @@
"workspaces": [
"packages/*"
],
"engines": {
"node": ">=18"
},
"packageManager": "[email protected]"
}
1 change: 1 addition & 0 deletions packages/drops/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"engines": {
"node": ">=18"
},
"packageManager": "[email protected]",
"dependencies": {
"@poap-xyz/providers": "0.7.3",
"@poap-xyz/utils": "0.7.3"
Expand Down
1 change: 1 addition & 0 deletions packages/frames/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"engines": {
"node": ">=18"
},
"packageManager": "[email protected]",
"dependencies": {
"next-seo": "^6.4.0"
}
Expand Down
7 changes: 4 additions & 3 deletions packages/moments/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@
"scripts": {
"build": "rollup -c --bundleConfigAsCjs"
},
"engines": {
"node": ">=18"
},
"packageManager": "[email protected]",
"dependencies": {
"@poap-xyz/providers": "0.7.3",
"@poap-xyz/utils": "0.7.3",
"uuid": "^9.0.0"
},
"engines": {
"node": ">=18"
},
"devDependencies": {
"@types/uuid": "^9.0.2"
}
Expand Down
7 changes: 4 additions & 3 deletions packages/poaps/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@
"scripts": {
"build": "rollup -c --bundleConfigAsCjs"
},
"engines": {
"node": ">=18"
},
"packageManager": "[email protected]",
"dependencies": {
"@poap-xyz/providers": "0.7.3",
"@poap-xyz/utils": "0.7.3"
},
"engines": {
"node": ">=18"
}
}
7 changes: 4 additions & 3 deletions packages/providers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
"scripts": {
"build": "rollup -c --bundleConfigAsCjs"
},
"engines": {
"node": ">=18"
},
"packageManager": "[email protected]",
"dependencies": {
"@poap-xyz/utils": "0.7.3",
"axios": "^1.6.8",
Expand All @@ -33,8 +37,5 @@
"devDependencies": {
"axios-mock-adapter": "^1.21.4",
"jest-fetch-mock": "^3.0.3"
},
"engines": {
"node": ">=18"
}
}
3 changes: 2 additions & 1 deletion packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@
},
"engines": {
"node": ">=18"
}
},
"packageManager": "[email protected]"
}
4 changes: 2 additions & 2 deletions publish-beta-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ for pkg in "${DIRS[@]}"; do
fi

# Build the package
if ! npm run build; then
if ! yarn build; then
echo "Error: Failed to build $pkg_name"
exit 1
fi

# Publish the package with a "beta" tag
if ! npm publish --tag beta; then
if ! yarn npm publish --tag beta; then
echo "Error: Failed to publish $pkg_name"
exit 1
fi
Expand Down
10 changes: 5 additions & 5 deletions publish-update-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ source package-order.sh
for pkg in "${DIRS[@]}"; do
pkg_name=$(jq -r '.name' $pkg/package.json)
current_version=$(jq -r '.version' $pkg/package.json)
remote_version=$(npm view $pkg_name version 2>/dev/null)
remote_version=$(yarn npm info $pkg_name --fields version --json 2>/dev/null | jq -r '.version')

# Change to the directory
if ! cd "$pkg"; then
Expand All @@ -14,8 +14,8 @@ for pkg in "${DIRS[@]}"; do
fi

# Run the build command
if ! npm run build; then
echo "Error: Failed to run 'npm run build' in directory: packages/$pkg"
if ! yarn build; then
echo "Error: Failed to run 'yarn build' in directory: packages/$pkg"
exit 1
fi

Expand All @@ -28,8 +28,8 @@ for pkg in "${DIRS[@]}"; do
fi

# Run the publish command
if ! npm publish --access public; then
echo "Error: Failed to run 'npm publish --access public' in directory: packages/$pkg"
if ! yarn npm publish --access public; then
echo "Error: Failed to run 'yarn npm publish --access public' in directory: packages/$pkg"
exit 1
fi

Expand Down

0 comments on commit f4cbadf

Please sign in to comment.