Skip to content

Commit

Permalink
Merge pull request #46 from opf/bump/primer-upstream
Browse files Browse the repository at this point in the history
Bump/primer upstream
  • Loading branch information
HDinger committed Apr 2, 2024
2 parents 1c567bf + 16ba5db commit 48a948e
Show file tree
Hide file tree
Showing 50 changed files with 200 additions and 96 deletions.
5 changes: 5 additions & 0 deletions .changeset/spicy-actors-act.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@openproject/octicons': patch
---

Update octicons in React to no longer set `role="img"` if the icon is aria-hidden.
5 changes: 5 additions & 0 deletions .changeset/tasty-countries-grow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@openproject/octicons': minor
---

Update ESM import to use mjs extension when in parent CommonJS module
3 changes: 2 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
* @primer/octicons-reviewers
* @primer/engineer-reviewers
icons @primer/octicons-reviewers
28 changes: 15 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Building
run: yarn build
- run: cp -r icons lib/build/svg
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: octicons-build
path: ./lib/build
Expand All @@ -32,7 +32,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: octicons-build
path: ./lib/build
Expand All @@ -54,7 +54,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: octicons-build
path: ./lib/build
Expand All @@ -78,7 +78,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: octicons-build
path: ./lib/build
Expand All @@ -102,8 +102,8 @@ jobs:
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- uses: actions/download-artifact@v3
ruby-version: 3.3
- uses: actions/download-artifact@v4
with:
name: octicons-build
path: ./lib/octicons_gem/lib/build
Expand All @@ -114,7 +114,7 @@ jobs:
run: bundle exec rake test
- name: Build
run: bundle exec rake build
- uses: actions/upload-artifact@master
- uses: actions/upload-artifact@v4
with:
name: octicons-gem
path: ./lib/octicons_gem/pkg
Expand All @@ -131,12 +131,13 @@ jobs:
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- uses: actions/download-artifact@v3
ruby-version: 3.3
- uses: actions/download-artifact@v4
with:
name: octicons-gem
path: ./lib/octicons_helper/vendor/cache
- run: bundle install
- name: Run bundle install
run: bundle config set --local disable_checksum_validation true && bundle install
- name: Linting
run: bundle exec rake lint
- name: Testing
Expand All @@ -154,12 +155,13 @@ jobs:
# - name: Setup Ruby
# uses: ruby/setup-ruby@v1
# with:
# ruby-version: 2.7
# - uses: actions/download-artifact@v3
# ruby-version: 3.3
# - uses: actions/download-artifact@v4
# with:
# name: octicons-gem
# path: ./lib/octicons_jekyll/vendor/cache
# - run: bundle install
# - name: Run bundle install
# run: bundle config set --local disable_checksum_validation true && bundle install
# - name: Linting
# run: bundle exec rake lint
# - name: Testing
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- run: npm i
- run: npm run build
- run: cp -r icons lib/build/svg
- uses: actions/upload-artifact@master
- uses: actions/upload-artifact@v4
with:
name: octicons
path: ./lib/build
Expand All @@ -25,7 +25,7 @@ jobs:
needs: setup
steps:
- uses: actions/checkout@master
- uses: actions/download-artifact@master
- uses: actions/download-artifact@v4
with:
name: octicons
path: ./lib/build
Expand All @@ -35,7 +35,7 @@ jobs:
with:
args: octicons_gem
- run: ls ./lib/octicons_gem/pkg
- uses: actions/upload-artifact@master
- uses: actions/upload-artifact@v4
with:
name: octicons_gem
path: ./lib/octicons_gem/pkg
Expand All @@ -44,11 +44,11 @@ jobs:
needs: gem
steps:
- uses: actions/checkout@master
- uses: actions/download-artifact@master
- uses: actions/download-artifact@v4
with:
name: octicons
path: ./lib/build
- uses: actions/download-artifact@master
- uses: actions/download-artifact@v4
with:
name: octicons_gem
path: ./lib/octicons_helper/vendor/cache
Expand All @@ -62,7 +62,7 @@ jobs:
needs: setup
steps:
- uses: actions/checkout@master
- uses: actions/download-artifact@master
- uses: actions/download-artifact@v4
with:
name: octicons
path: ./lib/build
Expand All @@ -76,7 +76,7 @@ jobs:
needs: setup
steps:
- uses: actions/checkout@master
- uses: actions/download-artifact@master
- uses: actions/download-artifact@v4
with:
name: octicons
path: ./lib/build
Expand Down
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ inherit_gem:
rubocop-github:
- config/default.yml
- config/rails.yml

AllCops:
NewCops: enable
5 changes: 3 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# frozen_string_literal: true

source "https://rubygems.org"

group :development, :test do
gem "minitest"
gem "rake"
gem "rubocop", "0.59"
gem "rubocop-github", "0.12.0"
gem "rubocop-github", "0.20.0"
end
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 GitHub Inc.
Copyright (c) 2024 GitHub Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
5 changes: 3 additions & 2 deletions lib/octicons_gem/Gemfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# frozen_string_literal: true

source "https://rubygems.org"

gemspec

group :development, :test do
gem "minitest"
gem "rake"
gem "rubocop", "0.59"
gem "rubocop-github", "0.12.0"
gem "rubocop-github", "0.20.0"
end
2 changes: 1 addition & 1 deletion lib/octicons_gem/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 GitHub Inc.
Copyright (c) 2024 GitHub Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 3 additions & 1 deletion lib/octicons_gem/Rakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "rake/testtask"
require "rubocop/rake_task"
require "bundler/gem_tasks"
Expand All @@ -12,7 +14,7 @@ Rake::TestTask.new do |t|
end

task :version, [:v] do |t, args|
out = "module Octicons\n"\
out = "# frozen_string_literal: true\n\nmodule Octicons\n"\
" VERSION = \"#{args[:v]}\".freeze\n"\
"end"
File.open(File.expand_path("../lib/octicons/version.rb", __FILE__), "w") { |file| file.puts out }
Expand Down
2 changes: 2 additions & 0 deletions lib/octicons_gem/lib/octicons.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "octicons/version"
require "octicons/octicon"
require "json"
Expand Down
2 changes: 2 additions & 0 deletions lib/octicons_gem/lib/octicons/octicon.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Octicons
class Octicon
DEFAULT_HEIGHT = 16
Expand Down
2 changes: 2 additions & 0 deletions lib/octicons_gem/lib/octicons/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Octicons
VERSION = "19.8.0".freeze
end
2 changes: 2 additions & 0 deletions lib/octicons_gem/octicons.gemspec
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require File.expand_path("../lib/octicons/version", __FILE__)

Gem::Specification.new do |s|
Expand Down
4 changes: 3 additions & 1 deletion lib/octicons_gem/test/helper.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# frozen_string_literal: true

require "minitest/autorun"
require "octicons"

def octicon(symbol, options = {})
::Octicons::Octicon.new(symbol, options)
Octicons::Octicon.new(symbol, options)
end
4 changes: 3 additions & 1 deletion lib/octicons_gem/test/octicon_test.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
require_relative "./helper"
# frozen_string_literal: true

require_relative "helper"

describe Octicons::Octicon do
it "fails when the octicon doesn't exist" do
Expand Down
4 changes: 3 additions & 1 deletion lib/octicons_gem/test/octicons_test.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
require_relative "./helper"
# frozen_string_literal: true

require_relative "helper"

describe Octicons do
it "loads all icons on initialization" do
Expand Down
5 changes: 3 additions & 2 deletions lib/octicons_helper/Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

source "https://rubygems.org"

gemspec
Expand All @@ -8,6 +10,5 @@ gem "rails"
group :development, :test do
gem "minitest"
gem "rake"
gem "rubocop", "0.59"
gem "rubocop-github", "0.12.0"
gem "rubocop-github", "0.20.0"
end
2 changes: 1 addition & 1 deletion lib/octicons_helper/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 GitHub Inc.
Copyright (c) 2024 GitHub Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 3 additions & 1 deletion lib/octicons_helper/Rakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "rake/testtask"
require "rubocop/rake_task"
require "bundler/gem_tasks"
Expand All @@ -7,7 +9,7 @@ RuboCop::RakeTask.new(:lint) do |t|
end

task :version, [:v] do |t, args|
out = "module OcticonsHelper\n"\
out = "# frozen_string_literal: true\n\nmodule OcticonsHelper\n"\
" VERSION = \"#{args[:v]}\".freeze\n"\
"end"
File.open(File.expand_path("../lib/octicons_helper/version.rb", __FILE__), "w") do |file|
Expand Down
2 changes: 2 additions & 0 deletions lib/octicons_helper/lib/octicons_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "octicons_helper/version"
require "octicons_helper/helper"
require "octicons_helper/railtie" if defined?(Rails)
2 changes: 2 additions & 0 deletions lib/octicons_helper/lib/octicons_helper/helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "octicons"
require "action_view"

Expand Down
2 changes: 2 additions & 0 deletions lib/octicons_helper/lib/octicons_helper/railtie.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "rails"

module OcticonsHelper
Expand Down
2 changes: 2 additions & 0 deletions lib/octicons_helper/lib/octicons_helper/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module OcticonsHelper
VERSION = "19.8.0".freeze
end
2 changes: 2 additions & 0 deletions lib/octicons_helper/octicons_helper.gemspec
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require File.expand_path("../lib/octicons_helper/version", __FILE__)

Gem::Specification.new do |s|
Expand Down
2 changes: 2 additions & 0 deletions lib/octicons_helper/test/helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "minitest/autorun"
require "octicons_helper"

Expand Down
10 changes: 6 additions & 4 deletions lib/octicons_helper/test/octicons_helper_test.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
require_relative "./helper"
# frozen_string_literal: true

require_relative "helper"

describe OcticonsHelper do
describe "rendering" do
Expand All @@ -23,10 +25,10 @@

mock = Minitest::Mock.new
def mock.path
@@call_count ||= 0
@@call_count += 1
@call_count ||= 0
@call_count += 1

raise "Octicon library called twice" if @@call_count > 1
raise "Octicon library called twice" if @call_count > 1

"foo"
end
Expand Down
3 changes: 3 additions & 0 deletions lib/octicons_jekyll/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ inherit_gem:

Naming/FileName:
Enabled: false

AllCops:
NewCops: enable
7 changes: 4 additions & 3 deletions lib/octicons_jekyll/Gemfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# frozen_string_literal: true

source "https://rubygems.org"

gemspec

gem "openproject-octicons", "19.7.0"
gem "openproject-octicons", "19.8.0"

group :development, :test do
gem "minitest"
gem "rake"
gem "rubocop", "0.59"
gem "rubocop-github", "0.12.0"
gem "rubocop-github", "0.20.0"
end
Loading

0 comments on commit 48a948e

Please sign in to comment.