{"id":51631064,"url":"https://github.com/semgrep/convert-libman","last_synced_at":"2026-07-13T07:03:43.743Z","repository":{"id":321137700,"uuid":"1084618346","full_name":"semgrep/convert-libman","owner":"semgrep","description":"Conversion script for libman.json to package.json and package-lock.json","archived":false,"fork":false,"pushed_at":"2025-11-04T03:49:10.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-04T08:53:21.678Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/semgrep.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-27T23:33:57.000Z","updated_at":"2026-01-14T19:41:34.000Z","dependencies_parsed_at":"2025-10-28T02:32:35.625Z","dependency_job_id":"86b599a0-c21d-4b88-903d-78c109b425e0","html_url":"https://github.com/semgrep/convert-libman","commit_stats":null,"previous_names":["semgrep/convert-libman"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/semgrep/convert-libman","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semgrep%2Fconvert-libman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semgrep%2Fconvert-libman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semgrep%2Fconvert-libman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semgrep%2Fconvert-libman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/semgrep","download_url":"https://codeload.github.com/semgrep/convert-libman/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semgrep%2Fconvert-libman/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35413543,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-13T02:00:06.543Z","response_time":119,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2026-07-13T07:03:42.928Z","updated_at":"2026-07-13T07:03:43.728Z","avatar_url":"https://github.com/semgrep.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# convert-libman\n\nRecursively searches for `libman.json` files and converts each to `package.json` with automatic `package-lock.json` generation. The generated files are created in the same directory as each discovered `libman.json` file.\n\n## Manual Usage\n\n```bash\nnode convert-libman.js [path to directory to be scanned]\n\n# Example: scan from current directory\nnode convert-libman.js\n\n# Example: scan from a specific directory\nnode convert-libman.js ./projects\n```\n\n## Local Docker Usage\n\nPull the Docker image from GitHub Container Registry and run it locally:\n\n```bash\n# Pull the latest image\ndocker pull ghcr.io/semgrep/convert-libman\n\n# Run the conversion (scan from current directory)\ndocker run --rm -v $(pwd):/convert ghcr.io/semgrep/convert-libman\n\n# Run the conversion (scan from a specific subdirectory)\ndocker run --rm -v $(pwd):/convert ghcr.io/semgrep/convert-libman /convert/some/subdirectory\n```\n\n## Docker CI Usage\n\n```yaml\n# GitHub Actions example\n- name: Convert libman\n  run: |\n    docker run -v ${{ github.workspace }}:/convert ghcr.io/semgrep/convert-libman\n\n# GitLab CI example\nconvert-libman:\n  script:\n    - docker run -v $PWD:/convert ghcr.io/semgrep/convert-libman\n```\n\n```bash\n# Command line\ndocker run -v $(pwd):/convert ghcr.io/semgrep/convert-libman\n```\n\n## GitHub Actions Usage\n\nTo automatically update \u0026 check in any changes made to libman.json, use the below action\n\n```yaml\nname: Convert libman.json to package files\non:\n  push:\n    paths:\n      - '**/libman.json'\n\npermissions:\n  contents: write  # needed to push commits\n\njobs:\n  convert-libman:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout repo\n        uses: actions/checkout@v4\n        with:\n          fetch-depth: 0   # so we can push back to the same ref\n\n      - name: Convert libman\n        run: |\n          docker run -v \"${{ github.workspace }}:/convert\" ghcr.io/semgrep/convert-libman\n\n      - name: Commit updated package files (if any)\n        run: |\n          set -euo pipefail\n\n          # make the workspace safe for git (sometimes needed in CI)\n          git config --global --add safe.directory \"$GITHUB_WORKSPACE\"\n\n          # author details for the commit\n          git config user.name \"github-actions[bot]\"\n          git config user.email \"github-actions[bot]@users.noreply.github.com\"\n\n          # stage only package files that changed/appeared\n          CHANGED=$(git status --porcelain -- '**/package.json' '**/package-lock.json' | wc -l)\n          if [ \"$CHANGED\" -gt 0 ]; then\n            git add **/package.json **/package-lock.json\n            git commit -m \"chore(convert-libman): update package files after libman.json change\"\n            git push\n            echo \"Committed and pushed package file updates.\"\n          else\n            echo \"No package file changes to commit.\"\n          fi\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemgrep%2Fconvert-libman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsemgrep%2Fconvert-libman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemgrep%2Fconvert-libman/lists"}