Documentation
¶
Overview ¶
Package npm implements a notice.Collector for direct dependencies declared in frontend/package.json. devDependencies are excluded.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
Collector enumerates the `dependencies` listed in frontend/package.json and builds a NOTICE entry for each by reading the matching directory inside frontend/node_modules. devDependencies are ignored.
type FileSystem ¶
type FileSystem interface {
ReadFile(path string) ([]byte, error)
Stat(path string) (os.FileInfo, error)
}
FileSystem is the small slice of os we depend on. Tests inject a fake to avoid materializing real node_modules trees on disk where possible (though most fixtures still use t.TempDir() since pkg directories are looked up by os.ReadFile).
Click to show internal directories.
Click to hide internal directories.