{"id":14111070,"url":"https://github.com/scaleway/scaleway-lib","last_synced_at":"2026-02-16T12:21:47.203Z","repository":{"id":36959454,"uuid":"330975800","full_name":"scaleway/scaleway-lib","owner":"scaleway","description":"scaleway-lib is a set of NPM packages used at Scaleway","archived":false,"fork":false,"pushed_at":"2026-01-10T21:11:31.000Z","size":17144,"stargazers_count":31,"open_issues_count":10,"forks_count":11,"subscribers_count":9,"default_branch":"main","last_synced_at":"2026-01-11T02:50:02.724Z","etag":null,"topics":["dataloader","eslint","hooks","i18n","internationalization","query-params","react","react-query","scaleway-lib","segment","swr","translation","unit-format","use-dataloader"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scaleway.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-01-19T12:41:01.000Z","updated_at":"2026-01-09T16:39:24.000Z","dependencies_parsed_at":"2023-10-04T04:29:01.908Z","dependency_job_id":"f04c78ca-6826-4805-904d-c9e0a2a0f3ca","html_url":"https://github.com/scaleway/scaleway-lib","commit_stats":{"total_commits":2665,"total_committers":34,"mean_commits":78.38235294117646,"dds":0.4671669793621013,"last_synced_commit":"4db4fd184cd45359f72d7c91de2730d058e4e3cc"},"previous_names":[],"tags_count":1028,"template":false,"template_full_name":null,"purl":"pkg:github/scaleway/scaleway-lib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scaleway%2Fscaleway-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scaleway%2Fscaleway-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scaleway%2Fscaleway-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scaleway%2Fscaleway-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scaleway","download_url":"https://codeload.github.com/scaleway/scaleway-lib/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scaleway%2Fscaleway-lib/sbom","scorecard":{"id":803359,"data":{"date":"2025-08-11","repo":{"name":"github.com/scaleway/scaleway-lib","commit":"32e22284fda10d4010ae60cf115b4dd657321775"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.5,"checks":[{"name":"Maintained","score":10,"reason":"30 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":3,"reason":"Found 2/6 approved changesets -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/changesets-renovate.yml:1","Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/pull_request_title.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/changesets-renovate.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/scaleway/scaleway-lib/changesets-renovate.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changesets-renovate.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/scaleway/scaleway-lib/changesets-renovate.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/scaleway/scaleway-lib/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/scaleway/scaleway-lib/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/scaleway/scaleway-lib/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/scaleway/scaleway-lib/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/scaleway/scaleway-lib/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/scaleway/scaleway-lib/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/scaleway/scaleway-lib/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/scaleway/scaleway-lib/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/scaleway/scaleway-lib/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/scaleway/scaleway-lib/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:68: update your workflow using https://app.stepsecurity.io/secureworkflow/scaleway/scaleway-lib/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:69: update your workflow using https://app.stepsecurity.io/secureworkflow/scaleway/scaleway-lib/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:71: update your workflow using https://app.stepsecurity.io/secureworkflow/scaleway/scaleway-lib/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pull_request_title.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/scaleway/scaleway-lib/pull_request_title.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pull_request_title.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/scaleway/scaleway-lib/pull_request_title.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pull_request_title.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/scaleway/scaleway-lib/pull_request_title.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/scaleway/scaleway-lib/release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/scaleway/scaleway-lib/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/scaleway/scaleway-lib/release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/scaleway/scaleway-lib/release.yml/main?enable=pin","Info:   0 out of  13 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   9 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":4,"reason":"6 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-xffm-g5w8-qvg7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-67mh-4wv8-2f99","Warn: Project is vulnerable to: GHSA-q5j8-9m9g-x2jh","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T11:06:30.274Z","repository_id":36959454,"created_at":"2025-08-23T11:06:30.274Z","updated_at":"2025-08-23T11:06:30.274Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28477207,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T03:13:13.607Z","status":"ssl_error","status_checked_at":"2026-01-16T03:11:47.863Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dataloader","eslint","hooks","i18n","internationalization","query-params","react","react-query","scaleway-lib","segment","swr","translation","unit-format","use-dataloader"],"created_at":"2024-08-14T10:03:07.783Z","updated_at":"2026-02-10T16:21:40.549Z","avatar_url":"https://github.com/scaleway.png","language":"TypeScript","readme":"![scaleway](https://user-images.githubusercontent.com/14060273/115696039-96f9ae00-a362-11eb-8225-8daafc861e86.png)\n\n![Codecov](https://img.shields.io/codecov/c/github/scaleway/scaleway-lib)\n![GitHub closed issues](https://img.shields.io/github/issues-closed/scaleway/scaleway-lib)\n![dependencies](https://david-dm.org/scaleway/scaleway-lib.svg)\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/scaleway/scaleway-lib)\n\n# scaleway-lib\n\nscaleway-lib is a set of NPM packages used at Scaleway.\n\n---\n\n- [Available packages](#available-packages)\n- [Development](#development)\n  - [Locally](#locally)\n  - [Link against another project (with `yalc`) =\u003e FAVORED](#link-against-another-project-with-yalc--favored)\n  - [Link against another project (with `pnpm link`)](#link-against-another-project-with-pnpm-link)\n  - [Linting](#linting)\n  - [Unit Test](#unit-test)\n- [Lerna](#lerna)\n- [Notes](#notes)\n  - [On build targets](#on-build-targets)\n  - [On build outputs](#on-build-outputs)\n  - [On commits](#on-commits)\n  - [On git hooks](#on-git-hooks)\n  - [On versioning](#on-versioning)\n- [Contributing Guidelines](#contributing-guidelines)\n\n---\n\n## Available packages\n\n- [`@scaleway/cookie-consent`](./packages/countries/README.md): React provider to handle website end user consent cookie storage based on segment integrations.\n\n  ![npm](https://img.shields.io/npm/dm/@scaleway/cookie-consent)\n  ![npm bundle size](https://packagephobia.com/badge?p=@scaleway/cookie-consent)\n  ![npm](https://img.shields.io/npm/v/@scaleway/cookie-consent)\n\n- [`@scaleway/countries`](./packages_deprecated/countries/README.md): ISO 3166/3166-2 coutries JSON database.\n\n  ![npm](https://img.shields.io/npm/dm/@scaleway/countries)\n  ![npm bundle size](https://packagephobia.com/badge?p=@scaleway/countries)\n  ![npm](https://img.shields.io/npm/v/@scaleway/countries)\n\n- [`@scaleway/eslint-config-react`](./packages/eslint-config-react/README.md): A shared eslint react opiniated configuration. Available in Javascript and Typescript.\n\n  ![npm](https://img.shields.io/npm/dm/@scaleway/eslint-config-react)\n  ![npm bundle size](https://packagephobia.com/badge?p=@scaleway/eslint-config-react)\n  ![npm](https://img.shields.io/npm/v/@scaleway/eslint-config-react)\n\n- [`@scaleway/random-name`](./packages/random-name/README.md): A tiny utility to generate random names.\n\n  ![npm](https://img.shields.io/npm/dm/@scaleway/random-name)\n  ![npm bundle size](https://packagephobia.com/badge?p=@scaleway/random-name)\n  ![npm](https://img.shields.io/npm/v/@scaleway/random-name)\n\n- [`@scaleway/use-dataloader`](./packages/use-dataloader/README.md):\n  A tiny react hook to to handle api requests.\n\n  ![npm](https://img.shields.io/npm/dm/@scaleway/use-dataloader)\n  ![npm bundle size](https://packagephobia.com/badge?p=@scaleway/use-dataloader)\n  ![npm](https://img.shields.io/npm/v/@scaleway/use-dataloader)\n\n- [`@scaleway/use-query-params`](./packages/use-query-params/README.md):\n  A tiny react hook to read and update URLs query parameters.\n\n  ![npm](https://img.shields.io/npm/dm/@scaleway/use-query-params)\n  ![npm bundle size](https://packagephobia.com/badge?p=@scaleway/use-query-params)\n  ![npm](https://img.shields.io/npm/v/@scaleway/use-query-params)\n\n- [`@scaleway/use-segment`](./packages/use-segment/README.md):\n  A tiny hooks to handle segment events.\n\n  ![npm](https://img.shields.io/npm/dm/@scaleway/use-segment)\n  ![npm bundle size](https://packagephobia.com/badge?p=@scaleway/use-segment)\n  ![npm](https://img.shields.io/npm/v/@scaleway/use-segment)\n\n- [`@scaleway/use-growthbook`](./packages/use-growthbook/README.md):\n  A tiny hook to handle Growthbook Feature flag and A/B test tool.\n\n  ![npm](https://img.shields.io/npm/dm/@scaleway/use-growthbook)\n  ![npm bundle size](https://packagephobia.com/badge?p=@scaleway/use-growthbook)\n  ![npm](https://img.shields.io/npm/v/@scaleway/use-growthbook)\n\n- [`@scaleway/use-gtm`](./packages/use-gtm/README.md):\n  A tiny hook to handle gtm.\n\n  ![npm](https://img.shields.io/npm/dm/@scaleway/use-gtm)\n  ![npm bundle size](https://packagephobia.com/badge?p=@scaleway/use-gtm)\n  ![npm](https://img.shields.io/npm/v/@scaleway/use-gtm)\n\n- [`@scaleway/use-i18n`](./packages/use-i18n/README.md):\n  A tiny hook to handle i18n.\n\n  ![npm](https://img.shields.io/npm/dm/@scaleway/use-i18n)\n  ![npm bundle size](https://packagephobia.com/badge?p=@scaleway/use-i18n)\n  ![npm](https://img.shields.io/npm/v/@scaleway/use-i18n)\n\n- [`@scaleway/regex`](./packages/regex/README.md): usefull regex named.\n\n  ![npm](https://img.shields.io/npm/dm/@scaleway/regex)\n  ![npm bundle size](https://packagephobia.com/badge?p=@scaleway/regex)\n  ![npm](https://img.shields.io/npm/v/@scaleway/regex)\n\n- [`@scaleway/fuzzy-search`](./packages/fuzzy-search/README.md): fuzzy search utility\n\n  ![npm](https://img.shields.io/npm/dm/@scaleway/fuzzy-search)\n  ![npm bundle size](https://packagephobia.com/badge?p=@scaleway/fuzzy-search)\n  ![npm](https://img.shields.io/npm/v/@scaleway/fuzzy-search)\n\n- [`@scaleway/jest-helpers`](./packages/jest-helpers/README.md): utilities jest functions.\n\n  ![npm](https://img.shields.io/npm/dm/@scaleway/jest-helpers)\n  ![npm bundle size](https://packagephobia.com/badge?p=@scaleway/jest-helpers)\n  ![npm](https://img.shields.io/npm/v/@scaleway/jest-helpers)\n\n- [`@scaleway/outdated-browser`](./packages/outdated-browser/README.md): A small web script to display outdated banne\n\n  ![npm](https://img.shields.io/npm/dm/@scaleway/outdated-browser)\n  ![npm bundle size](https://packagephobia.com/badge?p=@scaleway/outdated-browser)\n  ![npm](https://img.shields.io/npm/v/@scaleway/outdated-browser)\n\n- [`@scaleway/validate-icu-locales`](./packages/validate-icu-locales/README.md): A small cli to check ICU locales error\n\n  ![npm](https://img.shields.io/npm/dm/@scaleway/validate-icu-locales)\n  ![npm bundle size](https://packagephobia.com/badge?p=@scaleway/validate-icu-locales)\n  ![npm](https://img.shields.io/npm/v/@scaleway/validate-icu-locales)\n\n- [`@scaleway/use-storage`](./packages/use-storage/README.md): A React hook to interact with local/session storage in reactive way with the same API as setState\n\n  ![npm](https://img.shields.io/npm/dm/@scaleway/use-storage)\n  ![npm bundle size](https://packagephobia.com/badge?p=@scaleway/use-storage)\n  ![npm](https://img.shields.io/npm/v/@scaleway/use-storage)\n\n## Development\n\n### Locally\n\n```bash\n$ git clone git@github.com:scaleway/scaleway-lib.git\n$ cd scaleway-lib\n$ pnpm install\n$ # ... do your changes ...\n$ pnpm run lint\n$ pnpm run test\n```\n\n### Link against another project (with `yalc`) =\u003e FAVORED\n\n\u003e [`yalc`](https://github.com/whitecolor/yalc) is a tool aiming to simplify working with local npm packages by providing a different workflow than `npm/yarn/pnpm link`, hence avoiding most of their issues with module resolving.\n\n```bash\n$ pnpm install -g yalc # Make sure to have the yalc binary\n```\n\n```bash\n$ cd scaleway-lib/packages/example_package\n$ pnpm run build \u0026\u0026 yalc publish\n$ # Now it's ready to install in your project\n$ cd ../../../project-something\n$ yalc add @scaleway/package-name\n$ cd ../scaleway-lib/packages/example_package\n$ # If you do some changes into your package\n$ pnpm run build \u0026\u0026 yalc publish --push --sig # --push will automatically update the package on projects where it have been added, --sig updates the signature hash to trigger webpack update\n```\n\n\u003e :warning: since [1.0.0.pre.51 (2021-04-23)](https://github.com/wclr/yalc/blob/master/CHANGELOG.md#100pre51-2021-04-23), `yalc publish` needs the `--sig` option to trigger webpack module actual update.\n\n\u003e :warning: `yalc` create a `yalc.lock` and updates the `package.json` in the target project. **Make sure to not commit these changes**\n\n### Link against another project (with `pnpm link`)\n\n```bash\n$ cd packages/example_package \u0026\u0026 pnpm link\n$ cd - \u0026\u0026 pnpm run build # rebuild the package\n$ # Now it's ready to link into your project\n$ cd ../project-something\n$ pnpm link @scaleway/example_package\n```\n\n### Linting\n\n```bash\n$ pnpm run oxc\n$ pnpm run oxc:fix\n```\n\n### Unit Test\n\n```bash\n$ pnpm run test # Will run all tests\n$ pnpm run test --updateSnapshot # Will update all snapshots\n$ pnpm run test:watch # Will watch tests and only rerun the one who are modified\n$ pnpm run test:coverage # Will generate a coverage report\n```\n\n## Lerna\n\nThis project is managed with [Lerna](https://lerna.js.org). Lerna is a tool to manage multiple NPM packages inside the same repository.\n\nLerna also allows us to use [PNPM workspaces](https://pnpm.io/workspaces) to manage our dependencies. This implies a few things:\n\n- devDependencies should be included in top package.json\n- There should be no `node_modules` or `pnpm-lock.yml` in sub-packages\n- There is a special syntax to manage sub-packages dependencies:\n\n```bash\n$ pnpm add -W -D new_dependency # Add a new devDependency to root project\n$ cd packages/package_name \u0026\u0026 pnpm add new_dependency\n$ cd packages/package_name \u0026\u0026 pnpm remove old_dependency\n```\n\n## Notes\n\n### On build targets\n\nWe target by default Node@14 but you can add a browser output by adding a `browser` (you can find the spec [here](https://github.com/defunctzombie/package-browser-field-spec)) target to your `package.json`.\n\n```js\n  \"browser\": {\n    \"dist/module.js\": \"dist/module.browser.js\"\n  }\n```\n\nThe browserlist we are currently using is available in the [rollup.config.mjs](./rollup.config.mjs)\n\n\u003e :warning: Bear in mind that we do not currently support different entrypoint per target as we don't have the use case\n\n### On build outputs\n\nWe only output ESM modules. Please [read this](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).\n\nCompiled modules supports Node \u003e 14, the last two versions of any browsers and any browsers with more than 1% of marketshare at the time of release.\n\n### On commits\n\nWe enforce the [conventionnal commits](https://www.conventionalcommits.org) convention in order to infer package bump versions and generate changelog.\n\n### On git hooks\n\nWe have a [husky](https://github.com/typicode/husky) hook on `pre-commit` and `pre-push` which will ensure the file you committed matches the configured formating (`eslint` + `prettier`)\n\nWe also have one on `commit-msg` which will ensure you commit message respects our commit convention\n\nWe strongly encourage you not to but you can skip these hooks by passing `--no-verify` to your `git` commands\n\n### On versioning\n\nWe follow the [semver](http://semver.org/) semantic.\n\n## Contributing Guidelines\n\n- Ensure tests are still ok and code coverage have not decreased\n- Follow linter rules ([tldr](#linting)).\n- CI is enforced, you won't be able to merge unless pipeline is successful.\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscaleway%2Fscaleway-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscaleway%2Fscaleway-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscaleway%2Fscaleway-lib/lists"}