Skip to content

Commit

Permalink
Bump Chroma to v2.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gandarez committed Sep 17, 2024
1 parent 414e118 commit 7e46589
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 20 deletions.
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ go 1.22.5
require (
github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358
github.com/alecthomas/assert v1.0.0
github.com/alecthomas/chroma/v2 v2.12.0
github.com/alecthomas/chroma/v2 v2.13.0
github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964
github.com/dlclark/regexp2 v1.10.0
github.com/dlclark/regexp2 v1.11.0
github.com/gandarez/go-olson-timezone v0.1.0
github.com/gandarez/go-realpath v1.0.0
github.com/juju/mutex v0.0.0-20180619145857-d21b13acf4bf
Expand All @@ -30,7 +30,7 @@ require (

require (
github.com/alecthomas/colour v0.1.0 // indirect
github.com/alecthomas/repr v0.3.0 // indirect
github.com/alecthomas/repr v0.4.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
Expand Down
16 changes: 8 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/alecthomas/assert v1.0.0 h1:3XmGh/PSuLzDbK3W2gUbRXwgW5lqPkuqvRgeQ30FI5o=
github.com/alecthomas/assert v1.0.0/go.mod h1:va/d2JC+M7F6s+80kl/R3G7FUiW6JzUO+hPhLyJ36ZY=
github.com/alecthomas/assert/v2 v2.2.1 h1:XivOgYcduV98QCahG8T5XTezV5bylXe+lBxLG2K2ink=
github.com/alecthomas/assert/v2 v2.2.1/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ=
github.com/alecthomas/chroma/v2 v2.12.0 h1:Wh8qLEgMMsN7mgyG8/qIpegky2Hvzr4By6gEF7cmWgw=
github.com/alecthomas/chroma/v2 v2.12.0/go.mod h1:4TQu7gdfuPjSh76j78ietmqh9LiurGF0EpseFXdKMBw=
github.com/alecthomas/assert/v2 v2.6.0 h1:o3WJwILtexrEUk3cUVal3oiQY2tfgr/FHWiz/v2n4FU=
github.com/alecthomas/assert/v2 v2.6.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
github.com/alecthomas/chroma/v2 v2.13.0 h1:VP72+99Fb2zEcYM0MeaWJmV+xQvz5v5cxRHd+ooU1lI=
github.com/alecthomas/chroma/v2 v2.13.0/go.mod h1:BUGjjsD+ndS6eX37YgTchSEG+Jg9Jv1GiZs9sqPqztk=
github.com/alecthomas/colour v0.1.0 h1:nOE9rJm6dsZ66RGWYSFrXw461ZIt9A6+nHgL7FRrDUk=
github.com/alecthomas/colour v0.1.0/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0=
github.com/alecthomas/repr v0.3.0 h1:NeYzUPfjjlqHY4KtzgKJiWd6sVq2eNUPTi34PiFGjY8=
github.com/alecthomas/repr v0.3.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc=
github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
Expand All @@ -65,8 +65,8 @@ github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964/go.mod h1:Xd9
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dlclark/regexp2 v1.10.0 h1:+/GIL799phkJqYW+3YbOd8LCcbHzT0Pbo8zl70MHsq0=
github.com/dlclark/regexp2 v1.10.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
github.com/dlclark/regexp2 v1.11.0 h1:G/nrcoOa7ZXlpoa/91N3X7mM3r8eIlMBBJZvsz/mxKI=
github.com/dlclark/regexp2 v1.11.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
Expand Down
52 changes: 44 additions & 8 deletions pkg/heartbeat/language.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,8 @@ const (
LanguageDebianControlFile
// LanguageDelphi represents the Delphi programming language.
LanguageDelphi
// LanguageDesktop represents the desktop programming language.
LanguageDesktop
// LanguageDesktopFile represents the Desktop file programming language.
LanguageDesktopFile
// LanguageDevicetree represents the Devicetree programming language.
LanguageDevicetree
// LanguageDG represents the DG programming language.
Expand Down Expand Up @@ -867,6 +867,8 @@ const (
LanguageMask
// LanguageMason represents the Mason programming language.
LanguageMason
// LanguageMaterializeSQLDialect represents the Materialize SQL dialect programming language.
LanguageMaterializeSQLDialect
// LanguageMathematica represents the Mathematica programming language.
LanguageMathematica
// LanguageMatlab represents the Matlab programming language.
Expand Down Expand Up @@ -949,6 +951,8 @@ const (
LanguageNatural
// LanguageNCL represents the NCL programming language.
LanguageNCL
// LanguageNDISASM represents the NDISASM programming language.
LanguageNDISASM
// LanguageNemerle represents the Nemerle programming language.
LanguageNemerle
// LanguageNeon represents the Neon programming language.
Expand Down Expand Up @@ -1065,6 +1069,8 @@ const (
LanguageProcessing
// LanguageProlog represents the Prolog programming language.
LanguageProlog
// LanguagePromela represents the Promela programming language.
LanguagePromela
// LanguagePromQL represents the PromQL programming language.
LanguagePromQL
// LanguageProtocolBuffer represents the ProtocolBuffer programming language.
Expand Down Expand Up @@ -1139,14 +1145,16 @@ const (
LanguageRed
// LanguageRedcode represents the Redcode programming language.
LanguageRedcode
// LanguageRegistry represents the Registry programming language.
LanguageRegistry
// LanguageRego represents the Rego programming language.
LanguageRego
// LanguageRegularExpression represents the RegularExpression programming language.
LanguageRegularExpression
// LanguageRenderScript represents the RenderScript programming language.
LanguageRenderScript
// LanguageRenPy represents the RenPy programming language.
LanguageRenPy
// LanguageRegistry represents the Registry programming language.
LanguageRegistry
// LanguageReScript represents the ReScript programming language.
LanguageReScript
// LanguageResourceBundle represents the ResourceBundle programming language.
Expand Down Expand Up @@ -1757,6 +1765,8 @@ const (
languageDebianControlFileStr = "Debian Control file"
languageDelphiStr = "Delphi"
languageDesktopStr = "desktop"
languageDesktopEntryStr = "desktop_entry"
languageDesktopFileStr = "Desktop file"
languageDevicetreeStr = "Devicetree"
languageDGStr = "dg"
languageDhallStr = "Dhall"
Expand Down Expand Up @@ -2011,6 +2021,8 @@ const (
languageMarkoStr = "Marko"
languageMaskStr = "Mask"
languageMasonStr = "Mason"
languageMaterializeStr = "materialize"
languageMaterializeSQLDialectStr = "Materialize SQL dialect"
languageMathematicaStr = "Mathematica"
languageMatlabStr = "Matlab"
languageMatlabSessionStr = "Matlab session"
Expand Down Expand Up @@ -2048,10 +2060,12 @@ const (
languageMXMLStr = "MXML"
languageMyghtyStr = "Myghty"
languageMySQLStr = "MySQL"
languageMzqlStr = "mzql"
languageNASMStr = "NASM"
languageNASMObjdumpStr = "objdump-nasm"
languageNaturalStr = "Natural"
languageNCLStr = "NCL"
languageNDISASMStr = "NDISASM"
languageNemerleStr = "Nemerle"
languageNeonStr = "Neon"
languageNesCStr = "nesC"
Expand Down Expand Up @@ -2110,6 +2124,7 @@ const (
languagePraatStr = "Praat"
languageProcessingStr = "Processing"
languagePrologStr = "Prolog"
languagePromelaStr = "Promela"
languagePromQLStr = "PromQL"
languageProtocolBufferStr = "Protocol Buffer"
languagePRQLStr = "PRQL"
Expand Down Expand Up @@ -2148,6 +2163,7 @@ const (
languageRedStr = "Red"
languageRedcodeStr = "Redcode"
languageRegistryStr = "reg"
languageRegoStr = "Rego"
languageRegularExpressionStr = "Regular Expression"
languageRenderScriptStr = "RenderScript"
languageRenPyStr = "Ren'Py"
Expand Down Expand Up @@ -2774,8 +2790,10 @@ func ParseLanguage(s string) (Language, bool) {
return LanguageDebianControlFile, true
case normalizeString(languageDelphiStr):
return LanguageDelphi, true
case normalizeString(languageDesktopStr):
return LanguageDesktop, true
case normalizeString(languageDesktopStr),
normalizeString(languageDesktopEntryStr),
normalizeString(languageDesktopFileStr):
return LanguageDesktopFile, true
case normalizeString(languageDevicetreeStr):
return LanguageDevicetree, true
case normalizeString(languageDGStr):
Expand Down Expand Up @@ -3284,6 +3302,10 @@ func ParseLanguage(s string) (Language, bool) {
return LanguageMask, true
case normalizeString(languageMasonStr):
return LanguageMason, true
case normalizeString(languageMaterializeStr),
normalizeString(languageMaterializeSQLDialectStr),
normalizeString(languageMzqlStr):
return LanguageMaterializeSQLDialect, true
case normalizeString(languageMathematicaStr):
return LanguageMathematica, true
case normalizeString(languageMatlabStr):
Expand Down Expand Up @@ -3364,6 +3386,8 @@ func ParseLanguage(s string) (Language, bool) {
return LanguageNatural, true
case normalizeString(languageNCLStr):
return LanguageNCL, true
case normalizeString(languageNDISASMStr):
return LanguageNDISASM, true
case normalizeString(languageNemerleStr):
return LanguageNemerle, true
case normalizeString(languageNeonStr):
Expand Down Expand Up @@ -3482,6 +3506,8 @@ func ParseLanguage(s string) (Language, bool) {
return LanguageProcessing, true
case normalizeString(languagePrologStr):
return LanguageProlog, true
case normalizeString(languagePromelaStr):
return LanguagePromela, true
case normalizeString(languagePromQLStr):
return LanguagePromQL, true
case normalizeString(languageProtocolBufferStr):
Expand Down Expand Up @@ -3558,6 +3584,8 @@ func ParseLanguage(s string) (Language, bool) {
return LanguageRedcode, true
case normalizeString(languageRegistryStr):
return LanguageRegistry, true
case normalizeString(languageRegoStr):
return LanguageRego, true
case normalizeString(languageRegularExpressionStr):
return LanguageRegularExpression, true
case normalizeString(languageRenderScriptStr):
Expand Down Expand Up @@ -4472,8 +4500,8 @@ func (l Language) String() string {
return languageDebianControlFileStr
case LanguageDelphi:
return languageDelphiStr
case LanguageDesktop:
return languageDesktopStr
case LanguageDesktopFile:
return languageDesktopFileStr
case LanguageDevicetree:
return languageDevicetreeStr
case LanguageDG:
Expand Down Expand Up @@ -4978,6 +5006,8 @@ func (l Language) String() string {
return languageMaskStr
case LanguageMason:
return languageMasonStr
case LanguageMaterializeSQLDialect:
return languageMaterializeSQLDialectStr
case LanguageMathematica:
return languageMathematicaStr
case LanguageMatlab:
Expand Down Expand Up @@ -5058,6 +5088,8 @@ func (l Language) String() string {
return languageNaturalStr
case LanguageNCL:
return languageNCLStr
case LanguageNDISASM:
return languageNDISASMStr
case LanguageNemerle:
return languageNemerleStr
case LanguageNeon:
Expand Down Expand Up @@ -5178,6 +5210,8 @@ func (l Language) String() string {
return languageProcessingStr
case LanguageProlog:
return languagePrologStr
case LanguagePromela:
return languagePromelaStr
case LanguagePromQL:
return languagePromQLStr
case LanguageProtocolBuffer:
Expand Down Expand Up @@ -5252,6 +5286,8 @@ func (l Language) String() string {
return languageRedcodeStr
case LanguageRegistry:
return languageRegistryStr
case LanguageRego:
return languageRegoStr
case LanguageRegularExpression:
return languageRegularExpressionStr
case LanguageRenderScript:
Expand Down
10 changes: 9 additions & 1 deletion pkg/heartbeat/language_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func languageTests() map[string]heartbeat.Language {
"Debian Control file": heartbeat.LanguageDebianControlFile,
"Debian Sourcelist": heartbeat.LanguageSourcesList,
"Delphi": heartbeat.LanguageDelphi,
"desktop": heartbeat.LanguageDesktop,
"Desktop file": heartbeat.LanguageDesktopFile,
"Devicetree": heartbeat.LanguageDevicetree,
"dg": heartbeat.LanguageDG,
"Dhall": heartbeat.LanguageDhall,
Expand Down Expand Up @@ -439,6 +439,7 @@ func languageTests() map[string]heartbeat.Language {
"Marko": heartbeat.LanguageMarko,
"Mask": heartbeat.LanguageMask,
"Mason": heartbeat.LanguageMason,
"Materialize SQL dialect": heartbeat.LanguageMaterializeSQLDialect,
"Mathematica": heartbeat.LanguageMathematica,
"Matlab": heartbeat.LanguageMatlab,
"Matlab session": heartbeat.LanguageMatlabSession,
Expand Down Expand Up @@ -479,6 +480,7 @@ func languageTests() map[string]heartbeat.Language {
"NASM": heartbeat.LanguageNASM,
"Natural": heartbeat.LanguageNatural,
"NCL": heartbeat.LanguageNCL,
"NDISASM": heartbeat.LanguageNDISASM,
"Nemerle": heartbeat.LanguageNemerle,
"Neon": heartbeat.LanguageNeon,
"nesC": heartbeat.LanguageNesC,
Expand Down Expand Up @@ -538,6 +540,7 @@ func languageTests() map[string]heartbeat.Language {
"Praat": heartbeat.LanguagePraat,
"Processing": heartbeat.LanguageProcessing,
"Prolog": heartbeat.LanguageProlog,
"Promela": heartbeat.LanguagePromela,
"PromQL": heartbeat.LanguagePromQL,
"Property Specification Language": heartbeat.LanguagePSL,
"Protocol Buffer": heartbeat.LanguageProtocolBuffer,
Expand Down Expand Up @@ -575,6 +578,7 @@ func languageTests() map[string]heartbeat.Language {
"Red": heartbeat.LanguageRed,
"Redcode": heartbeat.LanguageRedcode,
"reg": heartbeat.LanguageRegistry,
"Rego": heartbeat.LanguageRego,
"Regular Expression": heartbeat.LanguageRegularExpression,
"RenderScript": heartbeat.LanguageRenderScript,
"Ren'Py": heartbeat.LanguageRenPy,
Expand Down Expand Up @@ -796,9 +800,13 @@ func languageTestsAliases() map[string]heartbeat.Language {
"ASP Classic": heartbeat.LanguageClassicASP,
"Batch Script": heartbeat.LanguageBatchfile,
"csharp": heartbeat.LanguageCSharp,
"desktop": heartbeat.LanguageDesktopFile,
"desktop_entry": heartbeat.LanguageDesktopFile,
"FStar": heartbeat.LanguageFStar,
"Golang": heartbeat.LanguageGo,
"JSON-LD": heartbeat.LanguageJSONLD,
"materialize": heartbeat.LanguageMaterializeSQLDialect,
"mzql": heartbeat.LanguageMaterializeSQLDialect,
"SaltStack": heartbeat.LanguageSalt,
"Transact-SQL": heartbeat.LanguageTransactSQL,
"Visual Basic .NET": heartbeat.LanguageVBNet,
Expand Down

0 comments on commit 7e46589

Please sign in to comment.