├── .commitlintrc.js ├── .eslintrc.js ├── .eslintrc.local.json ├── .github ├── CODEOWNERS ├── ISSUE_TEMPLATE │ ├── bug.yml │ └── config.yml ├── actions │ ├── create-check │ │ └── action.yml │ └── install-latest-npm │ │ └── action.yml ├── dependabot.yml ├── matchers │ └── tap.json ├── settings.yml └── workflows │ ├── audit.yml │ ├── ci-release.yml │ ├── ci.yml │ ├── codeql-analysis.yml │ ├── post-dependabot.yml │ ├── pull-request.yml │ ├── release-integration.yml │ └── release.yml ├── .gitignore ├── .npmrc ├── .release-please-manifest.json ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── SECURITY.md ├── lib └── read-json.js ├── package.json ├── release-please-config.json └── test ├── basic.js ├── bin-non-string.js ├── bin.js ├── bom.js ├── bundle.js ├── cache.js ├── fill-types.js ├── fixtures ├── badbin.json ├── badbinnonstring.json ├── badmainnonstring.json ├── bin.json ├── bin │ └── echo ├── bindir.json ├── bindiroutofscope.json ├── bom.json ├── bundle-array.json ├── bundle-false.json ├── bundle-null.json ├── bundle-true.json ├── deepnested.json ├── emptybin.json ├── erroneous.json ├── indexjs-bad │ ├── index.js │ └── package.json ├── indexjs │ └── index.js ├── invalid-version │ └── package.json ├── man.json ├── man │ └── man1 │ │ └── test.1 ├── nobom.json ├── not-json.css ├── readmes │ ├── README │ ├── README.md │ ├── package.json │ └── readmexxx.yz ├── serverjs │ ├── package.json │ └── server.js ├── types │ ├── custom-dts │ │ ├── custom-path.d.ts │ │ └── one-new-field.json │ ├── default-dts │ │ ├── index.d.ts │ │ └── inferred.json │ ├── esmodule-exports-sugar │ │ ├── a │ │ │ ├── b.d.ts │ │ │ └── b.js │ │ └── sugar.json │ ├── esmodule-exports │ │ ├── a │ │ │ └── b │ │ │ │ ├── c.d.ts │ │ │ │ └── c.js │ │ └── exports.json │ ├── subpaths │ │ ├── a │ │ │ └── b │ │ │ │ ├── c.d.ts │ │ │ │ └── c.js │ │ └── subpath.json │ └── with-field │ │ ├── has-types-field.json │ │ └── index.d.ts └── underscores.json ├── git-head.js ├── helpful.js ├── indexjs.js ├── main-non-string.js ├── mans.js ├── non-json.js ├── readmes.js ├── semver.js ├── serverjs.js └── underscores.js /.commitlintrc.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/.commitlintrc.js -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/.eslintrc.js -------------------------------------------------------------------------------- /.eslintrc.local.json: -------------------------------------------------------------------------------- 1 | { 2 | "ignorePatterns": ["test/fixtures/**"] 3 | } 4 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/.github/CODEOWNERS -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/.github/ISSUE_TEMPLATE/bug.yml -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/.github/ISSUE_TEMPLATE/config.yml -------------------------------------------------------------------------------- /.github/actions/create-check/action.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/.github/actions/create-check/action.yml -------------------------------------------------------------------------------- /.github/actions/install-latest-npm/action.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/.github/actions/install-latest-npm/action.yml -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/.github/dependabot.yml -------------------------------------------------------------------------------- /.github/matchers/tap.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/.github/matchers/tap.json -------------------------------------------------------------------------------- /.github/settings.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/.github/settings.yml -------------------------------------------------------------------------------- /.github/workflows/audit.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/.github/workflows/audit.yml -------------------------------------------------------------------------------- /.github/workflows/ci-release.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/.github/workflows/ci-release.yml -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/.github/workflows/ci.yml -------------------------------------------------------------------------------- /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/.github/workflows/codeql-analysis.yml -------------------------------------------------------------------------------- /.github/workflows/post-dependabot.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/.github/workflows/post-dependabot.yml -------------------------------------------------------------------------------- /.github/workflows/pull-request.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/.github/workflows/pull-request.yml -------------------------------------------------------------------------------- /.github/workflows/release-integration.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/.github/workflows/release-integration.yml -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/.github/workflows/release.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/.gitignore -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/.npmrc -------------------------------------------------------------------------------- /.release-please-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | ".": "7.0.1" 3 | } 4 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/CODE_OF_CONDUCT.md -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/CONTRIBUTING.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/README.md -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/SECURITY.md -------------------------------------------------------------------------------- /lib/read-json.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/lib/read-json.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/package.json -------------------------------------------------------------------------------- /release-please-config.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/release-please-config.json -------------------------------------------------------------------------------- /test/basic.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/basic.js -------------------------------------------------------------------------------- /test/bin-non-string.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/bin-non-string.js -------------------------------------------------------------------------------- /test/bin.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/bin.js -------------------------------------------------------------------------------- /test/bom.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/bom.js -------------------------------------------------------------------------------- /test/bundle.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/bundle.js -------------------------------------------------------------------------------- /test/cache.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/cache.js -------------------------------------------------------------------------------- /test/fill-types.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/fill-types.js -------------------------------------------------------------------------------- /test/fixtures/badbin.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/fixtures/badbin.json -------------------------------------------------------------------------------- /test/fixtures/badbinnonstring.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/fixtures/badbinnonstring.json -------------------------------------------------------------------------------- /test/fixtures/badmainnonstring.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/fixtures/badmainnonstring.json -------------------------------------------------------------------------------- /test/fixtures/bin.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/fixtures/bin.json -------------------------------------------------------------------------------- /test/fixtures/bin/echo: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "Hello world" -------------------------------------------------------------------------------- /test/fixtures/bindir.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/fixtures/bindir.json -------------------------------------------------------------------------------- /test/fixtures/bindiroutofscope.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/fixtures/bindiroutofscope.json -------------------------------------------------------------------------------- /test/fixtures/bom.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/fixtures/bom.json -------------------------------------------------------------------------------- /test/fixtures/bundle-array.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/fixtures/bundle-array.json -------------------------------------------------------------------------------- /test/fixtures/bundle-false.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/fixtures/bundle-false.json -------------------------------------------------------------------------------- /test/fixtures/bundle-null.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/fixtures/bundle-null.json -------------------------------------------------------------------------------- /test/fixtures/bundle-true.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/fixtures/bundle-true.json -------------------------------------------------------------------------------- /test/fixtures/deepnested.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/fixtures/deepnested.json -------------------------------------------------------------------------------- /test/fixtures/emptybin.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/fixtures/emptybin.json -------------------------------------------------------------------------------- /test/fixtures/erroneous.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/fixtures/erroneous.json -------------------------------------------------------------------------------- /test/fixtures/indexjs-bad/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/fixtures/indexjs-bad/index.js -------------------------------------------------------------------------------- /test/fixtures/indexjs-bad/package.json: -------------------------------------------------------------------------------- 1 | {"this is 2 | 3 | Not valid json!! 4 | -------------------------------------------------------------------------------- /test/fixtures/indexjs/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/fixtures/indexjs/index.js -------------------------------------------------------------------------------- /test/fixtures/invalid-version/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/fixtures/invalid-version/package.json -------------------------------------------------------------------------------- /test/fixtures/man.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/fixtures/man.json -------------------------------------------------------------------------------- /test/fixtures/man/man1/test.1: -------------------------------------------------------------------------------- 1 | test man file 2 | -------------------------------------------------------------------------------- /test/fixtures/nobom.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/fixtures/nobom.json -------------------------------------------------------------------------------- /test/fixtures/not-json.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/fixtures/not-json.css -------------------------------------------------------------------------------- /test/fixtures/readmes/README: -------------------------------------------------------------------------------- 1 | foo 2 | -------------------------------------------------------------------------------- /test/fixtures/readmes/README.md: -------------------------------------------------------------------------------- 1 | *markdown* 2 | -------------------------------------------------------------------------------- /test/fixtures/readmes/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/fixtures/readmes/package.json -------------------------------------------------------------------------------- /test/fixtures/readmes/readmexxx.yz: -------------------------------------------------------------------------------- 1 | extra noise 2 | -------------------------------------------------------------------------------- /test/fixtures/serverjs/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/fixtures/serverjs/package.json -------------------------------------------------------------------------------- /test/fixtures/serverjs/server.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/fixtures/serverjs/server.js -------------------------------------------------------------------------------- /test/fixtures/types/custom-dts/custom-path.d.ts: -------------------------------------------------------------------------------- 1 | // Empty because implementation isn't important 2 | -------------------------------------------------------------------------------- /test/fixtures/types/custom-dts/one-new-field.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/fixtures/types/custom-dts/one-new-field.json -------------------------------------------------------------------------------- /test/fixtures/types/default-dts/index.d.ts: -------------------------------------------------------------------------------- 1 | // Empty because implementation isn't important 2 | -------------------------------------------------------------------------------- /test/fixtures/types/default-dts/inferred.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/fixtures/types/default-dts/inferred.json -------------------------------------------------------------------------------- /test/fixtures/types/esmodule-exports-sugar/a/b.d.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/types/esmodule-exports-sugar/a/b.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/types/esmodule-exports-sugar/sugar.json: -------------------------------------------------------------------------------- 1 | { 2 | "exports": "./a/b.js" 3 | } 4 | -------------------------------------------------------------------------------- /test/fixtures/types/esmodule-exports/a/b/c.d.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/types/esmodule-exports/a/b/c.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/types/esmodule-exports/exports.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/fixtures/types/esmodule-exports/exports.json -------------------------------------------------------------------------------- /test/fixtures/types/subpaths/a/b/c.d.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/types/subpaths/a/b/c.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/types/subpaths/subpath.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/fixtures/types/subpaths/subpath.json -------------------------------------------------------------------------------- /test/fixtures/types/with-field/has-types-field.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/fixtures/types/with-field/has-types-field.json -------------------------------------------------------------------------------- /test/fixtures/types/with-field/index.d.ts: -------------------------------------------------------------------------------- 1 | // Empty because implementation isn't important 2 | -------------------------------------------------------------------------------- /test/fixtures/underscores.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/fixtures/underscores.json -------------------------------------------------------------------------------- /test/git-head.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/git-head.js -------------------------------------------------------------------------------- /test/helpful.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/helpful.js -------------------------------------------------------------------------------- /test/indexjs.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/indexjs.js -------------------------------------------------------------------------------- /test/main-non-string.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/main-non-string.js -------------------------------------------------------------------------------- /test/mans.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/mans.js -------------------------------------------------------------------------------- /test/non-json.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/non-json.js -------------------------------------------------------------------------------- /test/readmes.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/readmes.js -------------------------------------------------------------------------------- /test/semver.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/semver.js -------------------------------------------------------------------------------- /test/serverjs.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/serverjs.js -------------------------------------------------------------------------------- /test/underscores.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/npm/read-package-json/HEAD/test/underscores.js --------------------------------------------------------------------------------