{"id":15598197,"url":"https://github.com/boneskull/nodejs-production-test-action","last_synced_at":"2025-07-15T11:40:58.026Z","repository":{"id":62378121,"uuid":"500627634","full_name":"boneskull/nodejs-production-test-action","owner":"boneskull","description":"Catches problems before publishing npm packages","archived":false,"fork":false,"pushed_at":"2025-07-08T17:37:25.000Z","size":651,"stargazers_count":6,"open_issues_count":11,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-08T18:53:06.847Z","etag":null,"topics":["npm","package-manager","publish","publishing","smoke","test","testing"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/boneskull.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}},"created_at":"2022-06-06T23:48:41.000Z","updated_at":"2025-05-11T06:55:13.000Z","dependencies_parsed_at":"2023-09-29T21:18:39.536Z","dependency_job_id":"dc66f50e-552f-4771-8807-47d1d2753fe9","html_url":"https://github.com/boneskull/nodejs-production-test-action","commit_stats":{"total_commits":212,"total_committers":2,"mean_commits":106.0,"dds":"0.24528301886792447","last_synced_commit":"0b7e53c633547052ca1c8fe3ee958c29d7601523"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/boneskull/nodejs-production-test-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boneskull%2Fnodejs-production-test-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boneskull%2Fnodejs-production-test-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boneskull%2Fnodejs-production-test-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boneskull%2Fnodejs-production-test-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boneskull","download_url":"https://codeload.github.com/boneskull/nodejs-production-test-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boneskull%2Fnodejs-production-test-action/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265432815,"owners_count":23764168,"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":["npm","package-manager","publish","publishing","smoke","test","testing"],"created_at":"2024-10-03T01:30:05.089Z","updated_at":"2025-07-15T11:40:57.987Z","avatar_url":"https://github.com/boneskull.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-production-test-action\n\n\u003e Catches publishing problems\n\n## Motivation\n\nSometimes things can go awry if you, say, accidentally a production dependency as a dev dependency. Or omit a file from the `files` prop. Or get too excited about adding stuff to `.npmignore`. Or maybe the entry points are wrong. Or you are trying to provide dual ESM/CJS modules (in which case, you _definitely_ need this).\n\nThis action will run a script (provided by you) within your package--as your package would appear to a consumer.\n\nIn other words, we want to check if `npm install \u003cyour-pkg\u003e` actually installs a package that can be used.\n\n## Inputs\n\n### `script`\n\nnpm script name (as in the `scripts` prop of `package.json`) to run. _Required._\n\n### `workspace`\n\nSpace-delimited list of one or more npm workspace names, paths, or a path to a workspace dir. Corresponds to the `--workspace` argument of `npm pack`. If present, will cause `npm run-script` to run for each resulting installation.\n\n### `workspaces`\n\nPack all workspaces. Corresponds to the `--workspaces` flag of `npm pack`. If true, will cause `npm run-script` to run for each resulting installation. _Boolean._\n\n### `includeWorkspaceRoot`\n\nIf [`workspaces`](#workspaces) is true, also pack the workspace root. Corresponds to the `--include-workspace-root` flag of `npm pack`. _Boolean._\n\n### `extraNpmInstallArgs`\n\nSpace-delimited list of extra arguments (including any leading dashes; e.g., `--ignore-scripts`) to use with `npm install /path/to/tarball.tgz`.\n\n### `verbose`\n\nIf `true`, print whatever `npm` is doing under the hood. _Boolean._\n\n### `json`\n\nIf `true`, output the result of the action as a single JSON blob.  The shape of this is defined by the `SmokerJsonOutput` type declared by [`midnight-smoker`](https://github.com/boneskull/midnight-smoker). _Boolean._\n\n## Outputs\n\nn/a\n\n## Example Usage\n\n```yaml\njobs:\n  smoke:\n    name: Smoke Test\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v3\n      - name: Install dependencies\n        run: npm install\n      - uses: boneskull/nodejs-production-test-action@v1\n        with:\n          script: test:smoke # name of script in workspace\n          # workspace: foo bar # // list of npm workspaces, if any\n          # workspaces: false # // if `true`, run script for all workspaces\n          # quiet: false # // do not suppress npm output\n          # includeWorkspaceRoot: false # // also include workspace root if `workspaces` is true\n          # extraNpmInstallArgs: '--ignore-scripts' # // extra flags for `npm install` of tarball (space-delimited), if needed\n```\n\n## Local Testing\n\nTo mimic what GH actions would do, run `node dist/index.js` and set the following environment variables (_all_ are required):\n\n- `INPUT_SCRIPT=\u003cyour-script\u003e`\n- `INPUT_QUIET=true` or `INPUT_QUIET=false`\n- `INPUT_WORKSPACES=true` or `INPUT_WORKSPACES=false`\n- `INPUT_INCLUDEWORKSPACEROOT=true` or `INPUT_INCLUDEWORKSPACEROOT=false`\n- `INPUT_JSON=true` or `INPUT_JSON=false`\n\nUsing the same convention, other inputs can be set this way via environment variables.\n\n## Notes\n\n- `npm run-script` operations are run in serial due to the typical low CPU core count of CI machines and the inability to abort child processes via GH's actions toolkit. This may be re-enabled at a later time if an API with `AbortSignal` support can be leveraged.\n- The installation of tarballs happens within a single temp dir. At a later time, each `npm install` should happen in its own directory. This will necessarily cause a slowdown, because the `npm install` command is run against all tarballs at once.\n- The temp dir is removed at the end of the run.\n- Lifecycle script output from `npm pack` is _always_ suppressed because it writes to `STDOUT` and thus inhibits parsing of its JSON output.\n\n## Roadmap\n\n- Run `npm install` and `npm run-script` in parallel (see [notes](#notes)).\n\n### Stuff I Won't Do But Will Entertain PRs For\n\n- Alternate package manager support\n- Execution of arbitrary scripts (instead of `package.json` scripts)\n\n### Non-Goals\n\n- Support for different CI services\n- Explicit support for unique or weird use-cases\n- Rewrite it in TypeScript\n\n## License\n\nCopyright © 2022 [Christopher \"boneskull\" Hiller](https://github.com/boneskull).  Licensed Apache-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboneskull%2Fnodejs-production-test-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboneskull%2Fnodejs-production-test-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboneskull%2Fnodejs-production-test-action/lists"}