From b3a2946a3d1e89fd16c542cf19e4fcedb6777ef5 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 23 Apr 2024 17:03:51 +0000 Subject: [PATCH 1/3] chore(release): 6.8.0 [skip ci] # [6.8.0](https://github.com/starknet-io/starknet.js/compare/v6.7.0...v6.8.0) (2024-04-23) ### Bug Fixes * starkne types 0.7 ([#1087](https://github.com/starknet-io/starknet.js/issues/1087)) ([b038c76](https://github.com/starknet-io/starknet.js/commit/b038c76fe204746f1d1023c2ad3b46c022f6edbd)) * tslib ([#1068](https://github.com/starknet-io/starknet.js/issues/1068)) ([dd7dc10](https://github.com/starknet-io/starknet.js/commit/dd7dc10c57fc3cc35298c0d584a178666e9cfed1)) * **utils:** fix block identifier ([#1076](https://github.com/starknet-io/starknet.js/issues/1076)) ([0a3499d](https://github.com/starknet-io/starknet.js/commit/0a3499d49751061ceae1a4d6023b34f402376efc)) ### Features * add getGasPrice rpc provider method ([#1056](https://github.com/starknet-io/starknet.js/issues/1056)) ([d396275](https://github.com/starknet-io/starknet.js/commit/d396275348aff9c932d2bb7466b2a55f96214e4e)) * Export function parseCalldataField() ([4d59658](https://github.com/starknet-io/starknet.js/commit/4d596582023f24522c25a1a515ee0246d2eca90a)) * rpc 0.7.1 ([#1071](https://github.com/starknet-io/starknet.js/issues/1071)) ([11dc600](https://github.com/starknet-io/starknet.js/commit/11dc6003c74b6b6d0408b3f5894b5b6739d4bfba)) --- CHANGELOG.md | 14 ++++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fb1b67803..6591b56de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +# [6.8.0](https://github.com/starknet-io/starknet.js/compare/v6.7.0...v6.8.0) (2024-04-23) + +### Bug Fixes + +- starkne types 0.7 ([#1087](https://github.com/starknet-io/starknet.js/issues/1087)) ([b038c76](https://github.com/starknet-io/starknet.js/commit/b038c76fe204746f1d1023c2ad3b46c022f6edbd)) +- tslib ([#1068](https://github.com/starknet-io/starknet.js/issues/1068)) ([dd7dc10](https://github.com/starknet-io/starknet.js/commit/dd7dc10c57fc3cc35298c0d584a178666e9cfed1)) +- **utils:** fix block identifier ([#1076](https://github.com/starknet-io/starknet.js/issues/1076)) ([0a3499d](https://github.com/starknet-io/starknet.js/commit/0a3499d49751061ceae1a4d6023b34f402376efc)) + +### Features + +- add getGasPrice rpc provider method ([#1056](https://github.com/starknet-io/starknet.js/issues/1056)) ([d396275](https://github.com/starknet-io/starknet.js/commit/d396275348aff9c932d2bb7466b2a55f96214e4e)) +- Export function parseCalldataField() ([4d59658](https://github.com/starknet-io/starknet.js/commit/4d596582023f24522c25a1a515ee0246d2eca90a)) +- rpc 0.7.1 ([#1071](https://github.com/starknet-io/starknet.js/issues/1071)) ([11dc600](https://github.com/starknet-io/starknet.js/commit/11dc6003c74b6b6d0408b3f5894b5b6739d4bfba)) + # [6.7.0](https://github.com/starknet-io/starknet.js/compare/v6.6.6...v6.7.0) (2024-04-03) ### Features diff --git a/package-lock.json b/package-lock.json index b99f26fad..17aa7a8b3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "starknet", - "version": "6.7.0", + "version": "6.8.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "starknet", - "version": "6.7.0", + "version": "6.8.0", "license": "MIT", "dependencies": { "@noble/curves": "~1.4.0", diff --git a/package.json b/package.json index 4ed042dda..f3f8b697e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "starknet", - "version": "6.7.0", + "version": "6.8.0", "description": "JavaScript library for Starknet", "main": "dist/index.js", "module": "dist/index.mjs", From 366c96096974cdff273eba23253121e39f8f577f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Pavi=C4=8Di=C4=87?= Date: Thu, 2 May 2024 12:59:41 +0200 Subject: [PATCH 2/3] Update CONTRIBUTING.md (#1117) --- CONTRIBUTING.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7a0fb65c1..f281e49cb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,10 +6,16 @@ If you want to contribute but don’t know what to do, take a look at these two _[Use GitHub interface](https://blog.sapegin.me/all/open-source-for-everyone/) for simple documentation changes, otherwise follow the steps below._ +> :warning: IMPORTANT NOTE :warning: +> +> All contributions are expected to be of the highest possible quality! That means the PR is thoroughly tested and documented, and without blindly generated ChatGPT code and documentation! We will not consider nor merge PR-s that do not comply to these rules! + + ## Prerequisites - If it’s your first pull request, watch [this amazing course](http://makeapullrequest.com/) by [Kent C. Dodds](https://twitter.com/kentcdodds). - Fork the repository and clone your fork. +- Checkout to the `develop` branch. - Install dependencies: `npm install`. ## Development workflow @@ -34,8 +40,9 @@ Or run tests in watch mode: npm test --watch ``` -By default the tests are executed in your local Devnet. If you want to use a specific -RPC node, you have to set some global variables before executing the tests: +By default the tests are executed in your local Devnet and everything should run automatically. + +If you want to use a specific RPC node, you have to set some global variables before executing the tests: ```bash export TEST_RPC_URL=http://192.168.1.44:9545/rpc/v0.5 # example of a Pathfinder node located in your local network From ba35b6c15caff2504c8d673ef5b5d810640c66df Mon Sep 17 00:00:00 2001 From: CollinsC1O <101604886+CollinsC1O@users.noreply.github.com> Date: Thu, 2 May 2024 16:22:43 +0100 Subject: [PATCH 3/3] docs: add example to url.ts (#1112) * docs: add example to url.ts * test: reomve leftover --- src/utils/url.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/utils/url.ts b/src/utils/url.ts index 9f1bb47ce..c43389688 100644 --- a/src/utils/url.ts +++ b/src/utils/url.ts @@ -16,6 +16,14 @@ const nonLocalhostDomainRE = /^[^\s.]+\.\S{2,}$/; /** * Loosely validate a URL `string`. + * + * @param {string} s - The URL to check for + * @return {boolean} `true` if url is valid, `false` otherwise + * @example + * ```typescript + * const s = "https://starknetjs.com/docs"; + * const result = isUrl(s); + * // result == true */ export function isUrl(s?: string): boolean { if (!s) { @@ -53,6 +61,14 @@ export function isUrl(s?: string): boolean { * @param {string} defaultPath - The default path to use if no URL or path is provided. * @param {string} [urlOrPath] - The optional URL or path to append to the base URL. * @return {string} The built URL. + * @example + * ```typescript + * const baseUrl = "https://starknetjs.com"; + * const defaultPath = "/"; + * const urlOrPath = "/docs"; + * const result = buildUrl(baseUrl, defaultPath, urlOrPath); + * + * result = "https://starknetjs.com/docs" */ export function buildUrl(baseUrl: string, defaultPath: string, urlOrPath?: string) { return isUrl(urlOrPath) ? urlOrPath! : urljoin(baseUrl, urlOrPath ?? defaultPath);