lib/linguist/generated.rb in github-linguist-7.28.0 vs lib/linguist/generated.rb in github-linguist-7.29.0
- old
+ new
@@ -66,10 +66,11 @@
go_lock? ||
poetry_lock? ||
pdm_lock? ||
esy_lock? ||
npm_shrinkwrap_or_package_lock? ||
+ pnpm_lock? ||
terraform_lock? ||
generated_yarn_plugnplay? ||
godeps? ||
generated_by_zephir? ||
htmlcov? ||
@@ -105,11 +106,12 @@
generated_gimp? ||
generated_visualstudio6? ||
generated_haxe? ||
generated_jooq? ||
generated_pascal_tlb? ||
- generated_sorbet_rbi?
+ generated_sorbet_rbi? ||
+ generated_sqlx_query?
end
# Internal: Is the blob an Xcode file?
#
# Generated if the file extension is an Xcode
@@ -430,10 +432,17 @@
# Returns true or false.
def npm_shrinkwrap_or_package_lock?
!!name.match(/npm-shrinkwrap\.json/) || !!name.match(/package-lock\.json/)
end
+ # Internal: Is the blob a generated pnpm lockfile?
+ #
+ # Returns true or false.
+ def pnpm_lock?
+ !!name.match(/pnpm-lock\.yaml/)
+ end
+
# Internal: Is the blob a generated Yarn Plug'n'Play?
#
# Returns true or false.
def generated_yarn_plugnplay?
!!name.match(/(^|\/)\.pnp\..*$/)
@@ -822,8 +831,21 @@
/ix)).map do |match|
key = match[0].downcase
val = match[1].gsub(/\A["']|["']\Z/, '')
[key, val]
end.select { |x| x.length == 2 }.to_h
+ end
+
+ # Internal: Is this a generated SQLx query file?
+ #
+ # SQLx is a Rust SQL library which generates `**/.sqlx/query-*.json` files
+ # in offline mode (enabled by default).
+ #
+ # These are used to be able to compile a project without requiring
+ # the development database to be online.
+ #
+ # Returns true or false.
+ def generated_sqlx_query?
+ !!name.match(/(?:^|.*\/)\.sqlx\/query-.+\.json$/)
end
end
end