{"id":17767285,"url":"https://github.com/jamiebuilds/std-pkg","last_synced_at":"2025-06-12T05:07:27.095Z","repository":{"id":57370419,"uuid":"141356368","full_name":"jamiebuilds/std-pkg","owner":"jamiebuilds","description":"The Official package.json Standard™ for Npm® endorsed fields","archived":false,"fork":false,"pushed_at":"2018-09-11T17:59:18.000Z","size":38,"stargazers_count":44,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-22T04:39:42.024Z","etag":null,"topics":["npm","official","package-json","spec","standard"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"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/jamiebuilds.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}},"created_at":"2018-07-17T23:28:04.000Z","updated_at":"2024-11-30T05:18:58.000Z","dependencies_parsed_at":"2022-08-29T17:02:39.102Z","dependency_job_id":null,"html_url":"https://github.com/jamiebuilds/std-pkg","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamiebuilds%2Fstd-pkg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamiebuilds%2Fstd-pkg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamiebuilds%2Fstd-pkg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamiebuilds%2Fstd-pkg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamiebuilds","download_url":"https://codeload.github.com/jamiebuilds/std-pkg/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamiebuilds%2Fstd-pkg/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259240875,"owners_count":22827193,"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","official","package-json","spec","standard"],"created_at":"2024-10-26T20:45:49.631Z","updated_at":"2025-06-12T05:07:27.057Z","avatar_url":"https://github.com/jamiebuilds.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# std-pkg\n\n\u003e The Official `package.json` Standard™ for Npm® endorsed fields†\n\n- Lazily asserts Correct™ values using getters\n- Strongly typed\n- Includes community standards\n\nThis is useful if you're writing tooling around `package.json` and want to make\nsure you are following the Official NPM `package.json` Standard™.\n\n## Install\n\n```sh\nyarn add std-pkg\n```\n\n## Usage\n\n```js\nconst Package = require('std-pkg');\nconst fs = require('fs');\n\nlet pkgPath = '/path/to/package.json';\nlet pkgContents = fs.readFileSync('/path/to/package.json', 'utf-8');\n\nlet pkg = new Package(pkgPath, pkgContents);\n\n// file paths\npkg.filePath;\npkg.dirPath;\npkg.nodeModulesPath;\npkg.nodeModulesBinPath;\npkg.nodeModulesCachePath;\n\n// file contents\npkg.fileContents;\npkg.json;\npkg.indentation;\n\n// essentials\npkg.name;\npkg.version;\n\n// info\npkg.description;\npkg.keywords;\npkg.license;\n\n// links\npkg.homepage;\npkg.bugs;\npkg.repository;\n\n// maintainers\npkg.author;\npkg.contributors;\n\n// files\npkg.files;\npkg.main;\npkg.bin;\npkg.man;\npkg.directories;\n\n// tasks\npkg.scripts;\npkg.config;\n\n// dependencies\npkg.dependencies;\npkg.devDependencies;\npkg.peerDependencies;\npkg.optionalDependencies;\npkg.bundledDependencies;\n\n// system\npkg.engines;\npkg.os;\npkg.cpu;\n\n// publishing\npkg.private;\npkg.publishConfig;\n\n// yarn\npkg.flat;\npkg.resolutions;\npkg.workspaces;\n\n// bundlers\npkg.module;\npkg.browser;\npkg.source;\npkg.sideEffects;\n\n// typescript\npkg.types;\n```\n\nRead [index.js](./index.js) and [test.js](./test.js) for valid values for each\nfield.\n\n---\n\n\u003e † This is not really a \"standard\", npm peeps are just being douchebags about\n\u003e anyone ever trying to standardize things because they as a private company\n\u003e would like to retain control which is the same reason npm is not open source.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamiebuilds%2Fstd-pkg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamiebuilds%2Fstd-pkg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamiebuilds%2Fstd-pkg/lists"}