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

Modernized Stack #80

Merged
merged 31 commits into from
Dec 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
475dd9d
wip: init
ohager Aug 15, 2024
4d9f684
Feat/remove cryptojs (#79)
ohager Aug 15, 2024
6412df6
v1.0.0
ohager Aug 15, 2024
b5001b4
feat: util package upgraded
ohager Aug 18, 2024
ecf3b43
feat: http module upgraded
ohager Aug 18, 2024
c1c455a
wip: sha256 in crypto is sync now, compilation with turbo works
ohager Aug 18, 2024
01edb13
test: fixing tests in standards
ohager Aug 18, 2024
4e4ef4c
wip: most things working...need to migrate tests from Jest to Vitest
ohager Aug 18, 2024
e941bc9
wip: more on core tests
ohager Aug 22, 2024
01636ab
wip: core unit tests migrated to vitest
ohager Aug 24, 2024
17cda06
ci: messing around with ci pipeline
ohager Aug 24, 2024
39f5fa1
ci: test coverage working
ohager Aug 24, 2024
1fa34e4
ci: tetsing
ohager Aug 24, 2024
7ef0ed1
ci: peerDeps added as internal devDeps for CI
ohager Aug 24, 2024
2d552bd
ci: fix build pipeline
ohager Aug 25, 2024
a367932
ci: removed implicit compilation from ci pipeline
ohager Aug 25, 2024
7765898
fix: another trial
ohager Aug 25, 2024
7bd689b
chore: fixes sonarcloud issues/recommendations
ohager Aug 25, 2024
82c5a8d
fix: toReversed() changed back to older reverse()
ohager Aug 25, 2024
6be8c4f
doc: core api docs updated
ohager Sep 8, 2024
8238d8c
fix: test syntax replace stuff
ohager Sep 8, 2024
b49c1c6
docs: contracts finished
ohager Sep 8, 2024
81b2760
docs: documentation updated
ohager Sep 8, 2024
5046110
fix: tests
ohager Sep 8, 2024
6dbe9b3
fix: failing tests
ohager Sep 8, 2024
0bf705e
doc: added core websandbox -- bundle works nicely
ohager Sep 22, 2024
6d36f00
feat: sandbox example for bundled core
ohager Sep 28, 2024
ec1bf44
chore: fixing outdated packages
ohager Dec 28, 2024
dd08048
chore: added compile deeps to test runs
ohager Dec 28, 2024
2e3caae
chore: adding changesets
ohager Dec 28, 2024
b3953dd
ci: added changeset and prepare for 2.0 release
ohager Dec 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [["signumjs/*"]],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
39 changes: 39 additions & 0 deletions .changeset/quick-months-sleep.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
"@signumjs/contracts": major
"@signumjs/standards": major
"@signumjs/wallets": major
"@signumjs/crypto": major
"@signumjs/core": major
"@signumjs/http": major
"@signumjs/util": major
---

This new version uses a completely modernized stack (turborepo, vite, vitest). Furthermore, the crypto package was rewritten to remove deprecated crypto-js library and being extensible. The standards (SRC) packages were reorganized and finally the monitor package was removed


Breaking Changes:

1. `@signumjs/monitor` was removed, as not really used
2. `@signumjs/crypto` was completely rewritten, mainly due to the deprecation of `crypto-js` and certain security implications
3. `@signumjs/standards` were reorganized respecting the Signum Request for Comment (SRC) numbering


How to update from 1.0 to 2.0

1. Monitor was removed

Drop `signumjs/monitor` (no replacement here) - if you used the monitor you can copy the code from the repo and include it manually in your code base


2. Adjust Crypto

- Passphrase generator was dropped, use `generateMnemonic` instead
- `generateMasterKeys` was renamed to `generateSignKeys`
- `hashSHA256` was renamed to `sha256AsHex` (and more sha256 hashers are available)
- `encryptAES` and `decryptAES` were dropped - use native crypto methods for AES encryption. Signum uses for their P2P encryption a AES based algorithm using the shared key (`encryptMessage` and `encryptData`)

> The new crypto package offers more secure random and sha256 functions and is much more flexible. Check the docs for more info

3. Using SRC based standards

Actually, not much to do here. It's just that the internal structure is organized by the SRC numbering.
22 changes: 13 additions & 9 deletions .github/workflows/build-signumjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,25 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis

- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20

- name: Run SignumJS Tests
run: |
npm ci
npm run test:ci
- name: Install turbo
run: npm install turbo -g

- name: Build/Bundle SignumJS
run: npm run build
- name: Install Deps
run: npm ci

- name: Compile and Bundle SignumJS packages
run: npm run bundle

- name: Test SignumJS packages
run: npm run test:ci

- name: fix code coverage paths
working-directory: ./coverage
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,5 @@ dist
# jetbrains

.idea
.turbo
coverage.json
2 changes: 1 addition & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm test
turbo run compile test bundle
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16
20
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,22 @@
interact with the [Signum Network blockchain](https://signum.network/), an advanced community-driven blockchain
technology.

---------------------------------------

👷‍♂️👷‍♂️👷‍♂️ 🏗️🏗️🏗️ MODERNIZATION IN PROGRESS 🏗️🏗️🏗️ 👷‍♂️👷‍♂️👷‍♂️

- [X] CONTRACTS
- [X] CORE
- [x] CRYPTO
- [X] HTTP
- [X] UTILS
- [X] STANDARDS
- [X] WALLET
- [ ] DOCUMENTATION
- [ ] EXAMPLES



----------------------------

Best way to start is with the extensive [Online Documentation](https://docs.signum.network/signum/signumjs)
Expand Down Expand Up @@ -126,7 +142,7 @@ console.log(dataView.getVariable(2))

```js
// using crypto
console.log(sig$crypto.hashSHA256("test"))
console.log(sig$crypto.sha256AsHex("test"))
```

```js
Expand Down
1 change: 1 addition & 0 deletions docs/.nojekyll
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
103 changes: 0 additions & 103 deletions docs/assets/css/custom.css

This file was deleted.

Loading
Loading