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

Setup NPM workspaces #199

Merged
merged 33 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
52170d2
[#146] Create package.json, move code to modules directory, update pa…
akshay-ap Jan 8, 2024
2f1d0e9
[#146] Update paths in Github workflow files
akshay-ap Jan 8, 2024
66f60e5
[#146] Update github workflows
akshay-ap Jan 8, 2024
42297e5
[#146] Remove modules: recurring_transfers, dutchx_seller
akshay-ap Jan 9, 2024
5f43e8d
[#146] Remove files and config related to linting in modules, Use roo…
akshay-ap Jan 9, 2024
1d63e10
[#146] Execute npm run fmt -ws command
akshay-ap Jan 9, 2024
53d2553
[#146] Replace @gnosis.pm imports with @safe.global from allowances m…
akshay-ap Jan 10, 2024
5387b7f
[#146] Remove package-lock.json from 4337 and 4337-gas-metering modul…
akshay-ap Jan 10, 2024
6eaeb6a
[#146] Fix failing github workflows
akshay-ap Jan 10, 2024
6e1d923
[#146] Fix failing github workflows
akshay-ap Jan 10, 2024
ad3d636
[#146] Fix failing github workflows
akshay-ap Jan 10, 2024
b4d89d5
[#146] Fix failing builds
akshay-ap Jan 10, 2024
15d38aa
[#146] Fix lint issue
akshay-ap Jan 10, 2024
07ceb2b
[#146] Fix failing workflow
akshay-ap Jan 10, 2024
5bf8b29
[#146] Fix failing workflow
akshay-ap Jan 10, 2024
142544b
[#146] Add rimraf dependency in modules/4337-gas-metering
akshay-ap Jan 10, 2024
3ccf922
[#146] Install all workspace dependencies
akshay-ap Jan 11, 2024
a254227
[#146] Install all workspace dependencies in github workflows
akshay-ap Jan 11, 2024
0a3f6e2
[#146] Remove eslint, prettier dependencies from packages
akshay-ap Jan 11, 2024
f51a55a
[#146] Update keywords in packages
akshay-ap Jan 11, 2024
7034b31
[#146] Update root package.json and package-lock.json, delete .eslint…
akshay-ap Jan 11, 2024
0e84234
[#146] Update github workflows: install depedencies using npm ci command
akshay-ap Jan 11, 2024
f8151a4
Merge branch 'master' of github.com:safe-global/safe-modules into ref…
akshay-ap Jan 11, 2024
067f165
[#146] Fix failing formal verification workflow
akshay-ap Jan 11, 2024
5b9a567
[#146] Fix failing certora github workflow
akshay-ap Jan 11, 2024
baa1aa1
[#146] Fix failing certora github workflow
akshay-ap Jan 11, 2024
8cbb4c9
[#146] Update README.md
akshay-ap Jan 11, 2024
7e477dc
remove prettier-plugin-solidity from individual packages
mmv08 Jan 11, 2024
1d03625
[#146] Ignore packages while check/formatting files
akshay-ap Jan 12, 2024
fd3d709
[#146] Pin certora-cli version to 5.0.5 for workflow to pass
akshay-ap Jan 12, 2024
06e1fbf
[#146] Add github worflow for global fmt checks
akshay-ap Jan 12, 2024
d772200
Merge branch 'master' of github.com:safe-global/safe-modules into ref…
akshay-ap Jan 12, 2024
c2630ac
Merge branch 'master' of github.com:safe-global/safe-modules into ref…
mmv08 Jan 12, 2024
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
File renamed without changes.
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
name: Bug report
about: Bug report about the Safe smart contracts

---

## Prerequisites
Expand All @@ -10,7 +9,7 @@ about: Bug report about the Safe smart contracts
- Support questions are better asked on our Discord: https://chat.safe.global
- Please ensure the issue isn't already reported.

*Please delete the above section and the instructions in the sections below before submitting*
_Please delete the above section and the instructions in the sections below before submitting_

## Description

Expand All @@ -26,7 +25,7 @@ Please describe concisely the bug you have found, and what you expect instead.

## Steps to reproduce

If applicable, please provide a *minimal* source code example to trigger the bug you have found.
If applicable, please provide a _minimal_ source code example to trigger the bug you have found.
Provide as much information as necessary to reproduce the bug.

## Additional context
Expand Down
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
name: Feature request
about: Suggest an idea or feature request for the Safe smart contracts project

---

## Prerequisites
Expand All @@ -10,7 +9,7 @@ about: Suggest an idea or feature request for the Safe smart contracts project
- Support questions are better asked on our Discord: https://chat.safe.global
- Please ensure the issue isn't already reported.

*Please delete the above section and the instructions in the sections below before submitting*
_Please delete the above section and the instructions in the sections below before submitting_

## Context / issue

Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/certora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ on:
branches:
- master
paths:
- 4337/**
- modules/4337/**
pull_request:
branches:
- master
paths:
- 4337/**
- modules/4337/**

workflow_dispatch:

Expand All @@ -19,11 +19,10 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
rule:
["verify4337Module.sh", "verifyTransactionExecutionMethods.sh", "verifyValidationData.sh"]
rule: ['verify4337Module.sh', 'verifyTransactionExecutionMethods.sh', 'verifyValidationData.sh']
defaults:
run:
working-directory: ./4337
working-directory: ./modules/4337
steps:
- uses: actions/checkout@v3

Expand All @@ -33,7 +32,7 @@ jobs:

- name: Install java
uses: actions/setup-java@v3
with: { java-version: "17", java-package: jre, distribution: semeru }
with: { java-version: '17', java-package: jre, distribution: semeru }

- name: Install certora cli
run: pip install -Iv certora-cli==5.0.5
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: safe-modules
on: [push]

jobs:
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 20.x
cache: npm
cache-dependency-path: package-lock.json
- run: npm ci
- run: npm run fmt:global-check
29 changes: 10 additions & 19 deletions .github/workflows/ci_4337.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,33 @@ on: [push]
jobs:
tests:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./4337
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 20.x
cache: npm
cache-dependency-path: 4337/package-lock.json
cache-dependency-path: package-lock.json
- run: npm ci
- run: npm run build && npm run build:ts
- run: npm run coverage
- run: npm run build -w modules/4337 && npm run build:ts -w modules/4337
- run: npm run coverage -w modules/4337
- name: Coveralls
uses: coverallsapp/github-action@master
with:
path-to-lcov: 4337/coverage/lcov.info
path-to-lcov: modules/4337/coverage/lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}
e2e:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./4337
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 20.x
cache: npm
cache-dependency-path: 4337/package-lock.json
cache-dependency-path: package-lock.json
- run: npm ci
- run: |
docker compose up -d
docker compose -f modules/4337/docker-compose.yaml up -d
# wait for containers to start up
SECONDS=0
until curl -fs http://localhost:8545 >/dev/null && curl -fs http://localhost:3000 >/dev/null; do
Expand All @@ -48,19 +42,16 @@ jobs:
sleep 1
done

npm run test:e2e
npm run test:e2e -w modules/4337
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./4337
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 20.x
cache: npm
cache-dependency-path: 4337/package-lock.json
cache-dependency-path: package-lock.json
- run: npm ci
- run: npm run lint
- run: npm run fmt:check
- run: npm run lint -w modules/4337
- run: npm run fmt:check -w modules/4337
11 changes: 4 additions & 7 deletions .github/workflows/ci_4337_gas_metering.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,14 @@ on: [push]
jobs:
checks:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./4337-gas-metering
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 20.x
cache: npm
cache-dependency-path: 4337-gas-metering/package-lock.json
cache-dependency-path: package-lock.json
- run: npm ci
- run: npm run fmt:check
- run: npm run lint
- run: npm run build
- run: npm run fmt:check -w modules/4337-gas-metering
- run: npm run lint -w modules/4337-gas-metering
- run: npm run build -w modules/4337-gas-metering
14 changes: 7 additions & 7 deletions .github/workflows/cla.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "CLA Assistant"
name: 'CLA Assistant'

on:
issue_comment:
Expand All @@ -16,7 +16,7 @@ jobs:
CLAAssistant:
runs-on: ubuntu-latest
steps:
- name: "CLA Assistant"
- name: 'CLA Assistant'
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
# Beta Release
uses: contributor-assistant/[email protected]
Expand All @@ -25,18 +25,18 @@ jobs:
# the below token should have repo scope and must be manually added by you in the repository's secret
PERSONAL_ACCESS_TOKEN: ${{ secrets.CLA_ACCESS_TOKEN }}
with:
path-to-signatures: "signatures/version1/cla.json"
path-to-document: "https://safe.global/cla" # e.g. a CLA or a DCO document
path-to-signatures: 'signatures/version1/cla.json'
path-to-document: 'https://safe.global/cla' # e.g. a CLA or a DCO document
# branch should not be protected
branch: "main"
branch: 'main'
# user names of users allowed to contribute without CLA
allowlist: lukasschor,rmeissner,Uxio0,tschubotz,bot*

# the followings are the optional inputs - If the optional inputs are not given, then default values will be taken
# enter the remote organization name where the signatures should be stored (Default is storing the signatures in the same repository)
remote-organization-name: "safe-global"
remote-organization-name: 'safe-global'
# enter the remote repository name where the signatures should be stored (Default is storing the signatures in the same repository)
remote-repository-name: "cla-signatures"
remote-repository-name: 'cla-signatures'
#create-file-commit-message: 'For example: Creating file for storing CLA Signatures'
#signed-commit-message: 'For example: $contributorName has signed the CLA in #$pullRequestNo'
#custom-notsigned-prcomment: 'pull request comment with Introductory message to ask new contributors to sign'
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
modules/**
File renamed without changes.
30 changes: 0 additions & 30 deletions 4337-gas-metering/.eslintrc.cjs

This file was deleted.

Loading