MCPcopy Create free account
hub / github.com/cloudfoundry/nodejs-buildpack / LoadPackageJSON

Method LoadPackageJSON

src/nodejs/supply/supply.go:574–585  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

572}
573
574func (s *Supplier) LoadPackageJSON() error {
575 p, err := package_json.LoadPackageJSON(filepath.Join(s.Stager.BuildDir(), "package.json"), s.Log)
576 if err != nil {
577 return err
578 }
579
580 s.PackageJSONNodeVersion = p.Engines.Node
581 s.NPMVersion = p.Engines.NPM
582 s.YarnVersion = p.Engines.Yarn
583
584 return nil
585}
586
587func formatNvmrcContent(version string) string {
588 if version == "node" {

Callers 2

supply_test.goFile · 0.80
RunFunction · 0.80

Calls 2

LoadPackageJSONFunction · 0.92
BuildDirMethod · 0.65

Tested by

no test coverage detected