From 0badafd5e4bce6c2a1ea6ec62d8fd344bcb0f613 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Wed, 4 May 2022 21:55:25 +0200 Subject: [PATCH] Update Jest documentation (28.0.3) --- assets/javascripts/templates/pages/about_tmpl.coffee | 2 +- lib/docs/filters/jest/clean_html.rb | 5 ----- lib/docs/filters/jest/entries.rb | 2 +- lib/docs/scrapers/jest.rb | 4 ++-- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 7b00aee1..5cd411cb 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -429,7 +429,7 @@ credits = [ 'https://raw.githubusercontent.com/jekyll/jekyll/master/LICENSE' ], [ 'Jest', - '2021 Facebook, Inc.', + '2022 Facebook, Inc.', 'MIT', 'https://raw.githubusercontent.com/facebook/jest/master/LICENSE' ], [ diff --git a/lib/docs/filters/jest/clean_html.rb b/lib/docs/filters/jest/clean_html.rb index 2cf74b9a..7f06144e 100644 --- a/lib/docs/filters/jest/clean_html.rb +++ b/lib/docs/filters/jest/clean_html.rb @@ -9,11 +9,6 @@ module Docs css('hr', '.hash-link', 'button', '.badge').remove - css('.anchor').each do |node| - node.parent['id'] = node['id'] - node.remove - end - css('.prism-code').each do |node| node.parent.parent.before(node) node.name = 'pre' diff --git a/lib/docs/filters/jest/entries.rb b/lib/docs/filters/jest/entries.rb index 368d8ffd..5a8d8057 100644 --- a/lib/docs/filters/jest/entries.rb +++ b/lib/docs/filters/jest/entries.rb @@ -39,7 +39,7 @@ module Docs name.remove! %r{[\s=<].*} name.prepend 'jest ' if name.start_with?('--') name.prepend 'Config: ' if slug == 'configuration' - id = node.at_css('.anchor')['id'] + id = node['id'] entries << [name, id] end diff --git a/lib/docs/scrapers/jest.rb b/lib/docs/scrapers/jest.rb index b2ab00b2..619a3d6a 100644 --- a/lib/docs/scrapers/jest.rb +++ b/lib/docs/scrapers/jest.rb @@ -2,7 +2,7 @@ module Docs class Jest < UrlScraper include MultipleBaseUrls self.type = 'simple' - self.release = '27.4.3' + self.release = '28.0.3' self.base_urls = [ 'https://jestjs.io/docs/', @@ -23,7 +23,7 @@ module Docs ] options[:attribution] = <<-HTML - © 2021 Facebook, Inc.
+ © 2022 Facebook, Inc.
Licensed under the MIT License. HTML