"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "modules/npm/package_builder.go" between
hugo-0.85.0.tar.gz and hugo-0.86.0.tar.gz

About: Hugo is a static site generator that takes a source directory of Markdown files and templates and uses these as input to create a complete website (written in Go).

package_builder.go  (hugo-0.85.0):package_builder.go  (hugo-0.86.0)
skipping to change at line 83 skipping to change at line 83
return err return err
} }
fi, err = fs.Stat(files.FilenamePackageHugoJSON) fi, err = fs.Stat(files.FilenamePackageHugoJSON)
if err != nil { if err != nil {
return err return err
} }
} }
} }
meta := fi.(hugofs.FileMetaInfo).Meta() meta := fi.(hugofs.FileMetaInfo).Meta()
masterFilename := meta.Filename() masterFilename := meta.Filename
f, err := meta.Open() f, err := meta.Open()
if err != nil { if err != nil {
return errors.Wrap(err, "npm pack: failed to open package file") return errors.Wrap(err, "npm pack: failed to open package file")
} }
b = newPackageBuilder(meta.Module(), f) b = newPackageBuilder(meta.Module, f)
f.Close() f.Close()
for _, fi := range fis { for _, fi := range fis {
if fi.IsDir() { if fi.IsDir() {
// We only care about the files in the root. // We only care about the files in the root.
continue continue
} }
if fi.Name() != files.FilenamePackageHugoJSON { if fi.Name() != files.FilenamePackageHugoJSON {
continue continue
} }
meta := fi.(hugofs.FileMetaInfo).Meta() meta := fi.(hugofs.FileMetaInfo).Meta()
if meta.Filename() == masterFilename { if meta.Filename == masterFilename {
continue continue
} }
f, err := meta.Open() f, err := meta.Open()
if err != nil { if err != nil {
return errors.Wrap(err, "npm pack: failed to open package file") return errors.Wrap(err, "npm pack: failed to open package file")
} }
b.Add(meta.Module(), f) b.Add(meta.Module, f)
f.Close() f.Close()
} }
if b.Err() != nil { if b.Err() != nil {
return errors.Wrap(b.Err(), "npm pack: failed to build") return errors.Wrap(b.Err(), "npm pack: failed to build")
} }
// Replace the dependencies in the original template with the merged set. // Replace the dependencies in the original template with the merged set.
b.originalPackageJSON[dependenciesKey] = b.dependencies b.originalPackageJSON[dependenciesKey] = b.dependencies
b.originalPackageJSON[devDependenciesKey] = b.devDependencies b.originalPackageJSON[devDependenciesKey] = b.devDependencies
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)