Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Build Issue #59

Merged
merged 10 commits into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 36 additions & 15 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,43 @@ jobs:
install:
working_directory: ~/etherspot-modular-sdk
docker:
- image: cimg/node:18.16.1
- image: cimg/node:20.11.1
auth:
username: $DOCKERHUB_USER
password: $DOCKERHUB_PASSWORD
steps:
- checkout
- run:
name: Install Bun
command: |
curl -fsSL https://bun.sh/install | bash
echo 'export BUN_INSTALL="$HOME/.bun"' >> $BASH_ENV
echo 'export PATH="$BUN_INSTALL/bin:$PATH"' >> $BASH_ENV
source $BASH_ENV
- run:
name: Authenticate with registry
command: echo "//registry.npmjs.org/:_authToken=$ETHERSPOT_NPM_TOKEN" > ~/etherspot-modular-sdk/.npmrc
- restore_cache:
key: dependency-cache-{{ checksum "package.json" }}
key: dependency-cache-{{ checksum "bun.lockb" }}
- run:
name: Install dependencies
command: npm install
command: bun install
- save_cache:
key: dependency-cache-{{ checksum "package.json" }}
key: dependency-cache-{{ checksum "bun.lockb" }}
paths:
- ./node_modules
- ~/.bun
- run:
name: Dry run build
command: npm run build
command: bun run build
# - slack/status:
# failure_message: "Triggered by: *${CIRCLE_USERNAME}* \n\n Ooops! The *$CIRCLE_JOB* job has failed! :circleci-fail:"
# webhook: "${SLACK_WEBHOOK_URL}"

e2e-tests:
working_directory: ~/etherspot-modular-sdk
docker:
- image: cimg/node:18.16.1
- image: cimg/node:20.11.1
auth:
username: $DOCKERHUB_USER
password: $DOCKERHUB_PASSWORD
Expand All @@ -47,18 +55,24 @@ jobs:
- when:
condition: <<pipeline.parameters.run_e2e_tests>>
steps:

- run:
name: Install Bun
command: |
curl -fsSL https://bun.sh/install | bash
echo 'export BUN_INSTALL="$HOME/.bun"' >> $BASH_ENV
echo 'export PATH="$BUN_INSTALL/bin:$PATH"' >> $BASH_ENV
source $BASH_ENV
- restore_cache:
key: dependency-cache-{{ checksum "package.json" }}
key: dependency-cache-{{ checksum "bun.lockb" }}
- run:
name: Authenticate with registry
command: echo "//registry.npmjs.org/:_authToken=$ETHERSPOT_NPM_TOKEN" > ~/etherspot-modular-sdk/.npmrc
- run:
name: Install dependencies
command: npm install
command: bun install
- run:
name: Build Etherpot Modular SDK
command: npm run build
command: bun run build
- run:
name: Checkout e2e repo and run tests
no_output_timeout: 60m
Expand Down Expand Up @@ -155,28 +169,35 @@ jobs:
publish-npm-package:
working_directory: ~/etherspot-modular-sdk
docker:
- image: cimg/node:18.16.1
- image: cimg/node:20.11.1
auth:
username: $DOCKERHUB_USER
password: $DOCKERHUB_PASSWORD
steps:
- checkout
- run:
name: Install Bun
command: |
curl -fsSL https://bun.sh/install | bash
echo 'export BUN_INSTALL="$HOME/.bun"' >> $BASH_ENV
echo 'export PATH="$BUN_INSTALL/bin:$PATH"' >> $BASH_ENV
source $BASH_ENV
- restore_cache:
key: dependency-cache-{{ checksum "package.json" }}
key: dependency-cache-{{ checksum "bun.lockb" }}
- run:
name: Authenticate with registry
command: echo "//registry.npmjs.org/:_authToken=$ETHERSPOT_NPM_TOKEN" > ~/etherspot-modular-sdk/.npmrc
- run:
name: Install dependencies
command: npm install
command: bun install
- run:
name: Build Etherpot Prime SDK
command: npm run build
command: bun run build
- run:
name: Publish package to npm
command: |
cd ~/etherspot-modular-sdk
npm publish --access public
bun publish --access public
- run:
name: Announce Publish
command: |
Expand Down
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
!.vscode/extensions.json
workspace.code-workspace

# build
dist

# node
node_modules

# dist
dist

# develop
.graphqlconfig
.cache
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [5.0.1] - 2025-02-26
### Fix
- Fixed build issues faced on React by changing build command to bun
- Added types build folder separately

## [5.0.0] - 2025-01-07
### Breaking Changes
- Changed contract address for Bootstrap to `0x0D5154d7751b6e2fDaa06F0cC9B400549394C8AA`
Expand Down
Binary file added bun.lockb
Binary file not shown.
Loading