{"id":21531936,"url":"https://github.com/matrixai/js-async-locks","last_synced_at":"2025-03-17T19:28:12.443Z","repository":{"id":37406710,"uuid":"471322799","full_name":"MatrixAI/js-async-locks","owner":"MatrixAI","description":"Asynchronous locking utilities","archived":false,"fork":false,"pushed_at":"2023-08-14T08:56:59.000Z","size":643,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"staging","last_synced_at":"2024-04-28T07:21:07.332Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://polykey.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MatrixAI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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}},"created_at":"2022-03-18T10:21:36.000Z","updated_at":"2024-06-21T04:45:45.141Z","dependencies_parsed_at":"2024-06-21T04:45:37.048Z","dependency_job_id":"96b10066-3b15-4b85-a977-d38ae3519114","html_url":"https://github.com/MatrixAI/js-async-locks","commit_stats":{"total_commits":69,"total_committers":4,"mean_commits":17.25,"dds":0.1594202898550725,"last_synced_commit":"1cd4a7a5c55e48cc5b4dc17d7da1de4c6fad33a8"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":"MatrixAI/TypeScript-Demo-Lib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatrixAI%2Fjs-async-locks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatrixAI%2Fjs-async-locks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatrixAI%2Fjs-async-locks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatrixAI%2Fjs-async-locks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MatrixAI","download_url":"https://codeload.github.com/MatrixAI/js-async-locks/tar.gz/refs/heads/staging","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244096070,"owners_count":20397332,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-24T02:18:13.045Z","updated_at":"2025-03-17T19:28:12.414Z","avatar_url":"https://github.com/MatrixAI.png","language":"TypeScript","readme":"# js-async-locks\n\nAsynchronous lock utilities.\n\nJavaScript exposes the ability to create interleaved execution of asynchronous\noperations. When this is done with shared state between asynchronous\noverlapping functions that perform partial state transitions, this can lead to\nrace conditions or data corruption and clobbering, or just invalid pre-condition\nor post-condition behaviour.\n\nThis library provides multiple synchronization constructs that allow one to\nprecisely control concurrent operations. These constructs are intended for\npessimistic concurrency control. If you can prefer to use optimistic concurrency\ncontrol mechanisms. But that is outside the scope of this library. In many cases\nyou cannot use optimistic methods, and thus you need this library.\n\n## Installation\n\n```sh\nnpm install --save @matrixai/async-locks\n```\n\n## Development\n\nRun `nix develop`, and once you're inside, you can use:\n\n```sh\n# install (or reinstall packages from package.json)\nnpm install\n# build the dist\nnpm run build\n# run the repl (this allows you to import from ./src)\nnpm run tsx\n# run the tests\nnpm run test\n# lint the source code\nnpm run lint\n# automatically fix the source\nnpm run lintfix\n```\n\n### Docs Generation\n\n```sh\nnpm run docs\n```\n\nSee the docs at: https://matrixai.github.io/js-async-locks/\n\n### Publishing\n\nPublishing is handled automatically by the staging pipeline.\n\nPrerelease:\n\n```sh\n# npm login\nnpm version prepatch --preid alpha # premajor/preminor/prepatch\ngit push --follow-tags\n```\n\nRelease:\n\n```sh\n# npm login\nnpm version patch # major/minor/patch\ngit push --follow-tags\n```\n\nManually:\n\n```sh\n# npm login\nnpm version patch # major/minor/patch\nnpm run build\nnpm publish --access public\ngit push\ngit push --tags\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatrixai%2Fjs-async-locks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatrixai%2Fjs-async-locks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatrixai%2Fjs-async-locks/lists"}