Skip to content

Commit

Permalink
Release 0.14.1 with patch to fix PluginManager
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredcwhite committed May 23, 2020
1 parent 215c2b3 commit 52fb97b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# master

# 0.14.1 / 2020-05-23

* Patch to fix PluginManager `yarn add` bug when there is no `dependencies` key in `package.json`

# 0.14.0 "Hazelwood" / 2020-05-17

* Use `liquid-render-tag` backport gem and remove references to temporary GitHub fork of Liquid [#52](https://github.com/bridgetownrb/bridgetown/pull/52) ([jaredcwhite](https://github.com/jaredcwhite))
Expand Down
8 changes: 6 additions & 2 deletions bridgetown-core/lib/bridgetown-core/plugin_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def self.require_from_bundler
# If that exact package hasn't been installed, execute yarn add
#
# Returns nothing.
# rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity
def self.install_yarn_dependencies(required_gems)
return unless File.exist?("package.json")

Expand All @@ -79,14 +80,17 @@ def self.install_yarn_dependencies(required_gems)
next unless yarn_add_dependency.length == 2

# check matching version number is see if it's already installed
current_package = package_json["dependencies"].dig(yarn_add_dependency.first)
next unless current_package.nil? || current_package != yarn_add_dependency.last
if package_json["dependencies"]
current_package = package_json["dependencies"].dig(yarn_add_dependency.first)
next unless current_package.nil? || current_package != yarn_add_dependency.last
end

# all right, time to install the package
cmd = "yarn add #{yarn_add_dependency.join("@")}"
system cmd
end
end
# rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity

# Require all .rb files
#
Expand Down
2 changes: 1 addition & 1 deletion bridgetown-core/lib/bridgetown-core/version.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

module Bridgetown
VERSION = "0.14.0"
VERSION = "0.14.1"
CODE_NAME = "Hazelwood"
end

0 comments on commit 52fb97b

Please sign in to comment.