Compare commits

...

7 Commits

Author SHA1 Message Date
Brandon Black
d761658f8b Release v5.0.4 (#3445)
* bumping to v5.0.3

* updating rugged
2017-01-31 15:08:52 -08:00
Brandon Black
3719214aba fixing null reference in yarn.lock check (#3444) 2017-01-31 14:45:22 -08:00
Paul Chaignon
47b109be36 Improve heuristic for Modula-2 (#3434)
Module names can contain dots
2017-01-24 15:10:46 -08:00
Javier Honduvilla Coto
1ec4db97c2 Be able to configure the number of threads for git submodules update (#3438)
* make the number of submodule update threads configurable

* change thread number to be a script argument
2017-01-24 09:55:31 -08:00
Brandon Black
9fe5fe0de2 v5.0.3 Release (#3436)
* bumping to v5.0.3

* updating grammars
2017-01-23 20:09:26 -08:00
sunderls
b36ea7ac9d Add yarn (#3432)
* add yarn.lock

* fix comment

* remove yarn test

* add test

* fix test

* try fix again

* try 3rd time

* check filename and firstline for yarn lockfile
2017-01-23 10:58:53 -08:00
Yuki Izumi
625b06c30d Use textmate/diff.tmbundle again (#3429)
Upstream textmate/diff.tmbundle#6 was merged.
2017-01-17 17:02:10 +11:00
25 changed files with 45 additions and 23 deletions

2
.gitmodules vendored
View File

@@ -249,7 +249,7 @@
url = https://github.com/textmate/d.tmbundle
[submodule "vendor/grammars/diff.tmbundle"]
path = vendor/grammars/diff.tmbundle
url = https://github.com/kivikakk/diff.tmbundle
url = https://github.com/textmate/diff.tmbundle
[submodule "vendor/grammars/dylan.tmbundle"]
path = vendor/grammars/dylan.tmbundle
url = https://github.com/textmate/dylan.tmbundle

View File

@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
s.add_dependency 'charlock_holmes', '~> 0.7.3'
s.add_dependency 'escape_utils', '~> 1.1.0'
s.add_dependency 'mime-types', '>= 1.19'
s.add_dependency 'rugged', '0.25.0b10'
s.add_dependency 'rugged', '0.25.1.1'
s.add_development_dependency 'minitest', '>= 5.0'
s.add_development_dependency 'mocha'

View File

@@ -80,7 +80,8 @@ module Linguist
generated_jflex? ||
generated_grammarkit? ||
generated_roxygen2? ||
generated_jison?
generated_jison? ||
generated_yarn_lock?
end
# Internal: Is the blob an Xcode file?
@@ -479,5 +480,14 @@ module Linguist
return lines[0].start_with?("/* parser generated by jison ") ||
lines[0].start_with?("/* generated by jison-lex ")
end
# Internal: Is the blob a generated yarn lockfile?
#
# Returns true or false.
def generated_yarn_lock?
return false unless name.match(/yarn\.lock/)
return false unless lines.count > 0
return lines[0].include?("# THIS IS AN AUTOGENERATED FILE")
end
end
end

View File

@@ -278,7 +278,7 @@ module Linguist
disambiguate ".mod" do |data|
if data.include?('<!ENTITY ')
Language["XML"]
elsif /MODULE\s\w+\s*;/i.match(data) || /^\s*END \w+;$/i.match(data)
elsif /^\s*MODULE [\w\.]+;/i.match(data) || /^\s*END [\w\.]+;/i.match(data)
Language["Modula-2"]
else
[Language["Linux Kernel Module"], Language["AMPL"]]

View File

@@ -1,3 +1,3 @@
module Linguist
VERSION = "5.0.2"
VERSION = "5.0.4"
end

View File

@@ -51,7 +51,7 @@ SUBMODULES.partition { |submodule| SLOW_SUBMODULES.include?(submodule) }.flatten
submodules.push(submodule)
end
8.times do
(ARGV.first || 8).to_i.times do
Thread.new { run_thread(submodules, results) }
end

9
test/fixtures/Data/yarn.lock vendored Normal file
View File

@@ -0,0 +1,9 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
abab@^1.0.0:
version "1.0.3"
resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.3.tgz#b81de5f7274ec4e756d797cd834f303642724e5d"
abbrev@1, abbrev@1.0.x:
version "1.0.9"
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135"

View File

@@ -79,6 +79,9 @@ class TestGenerated < Minitest::Test
generated_fixture_loading_data("Data/sourcemap.v3.map")
generated_fixture_loading_data("Data/sourcemap.v1.map")
# Yarn locfile
generated_fixture_loading_data("Data/yarn.lock")
# Specflow
generated_fixture_without_loading_data("Features/BindingCulture.feature.cs")