From 67fdf95ce7ba3553db1e3cd3c2fa69037f331ea2 Mon Sep 17 00:00:00 2001 From: Colin Seymour Date: Mon, 25 Nov 2024 15:44:55 +0000 Subject: [PATCH 01/22] Add .containerfile extension to Dockerfile (#7056) * Add .containerfile to Dockerfile * Add sample --- lib/linguist/languages.yml | 1 + samples/Dockerfile/debian-systemd.Containerfile | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 samples/Dockerfile/debian-systemd.Containerfile diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 9bde77235a..edd3656f84 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1632,6 +1632,7 @@ Dockerfile: tm_scope: source.dockerfile extensions: - ".dockerfile" + - ".containerfile" filenames: - Containerfile - Dockerfile diff --git a/samples/Dockerfile/debian-systemd.Containerfile b/samples/Dockerfile/debian-systemd.Containerfile new file mode 100644 index 0000000000..662ed0e87e --- /dev/null +++ b/samples/Dockerfile/debian-systemd.Containerfile @@ -0,0 +1,9 @@ +FROM debian:bullseye + +RUN apt-get update && apt-get install -y systemd systemd-sysv && apt-get clean +RUN systemctl mask systemd-logind systemd-udevd + +RUN apt-get install bash-completion +RUN echo "source /usr/share/bash-completion/bash_completion" >> /root/.bashrc + +CMD ["/lib/systemd/systemd"] \ No newline at end of file From 93935830a73a4bdb1e6ae7c72778c345f323e3ba Mon Sep 17 00:00:00 2001 From: Gyorgy Szaszko Date: Mon, 25 Nov 2024 16:42:23 +0100 Subject: [PATCH 02/22] Add OMNeT++ NED language (#7024) * added omnetpp-ned * added license --- .gitmodules | 3 + grammars.yml | 2 + lib/linguist/languages.yml | 8 ++ samples/omnetpp-ned/IWirelessInterface.ned | 20 +++ samples/omnetpp-ned/Ieee80211Interface.ned | 133 ++++++++++++++++++ samples/omnetpp-ned/TsnNetworkBase.ned | 30 ++++ vendor/README.md | 1 + vendor/grammars/omnetpp-textmate-ned | 1 + .../omnetpp-textmate-ned.dep.yml | 31 ++++ 9 files changed, 229 insertions(+) create mode 100644 samples/omnetpp-ned/IWirelessInterface.ned create mode 100644 samples/omnetpp-ned/Ieee80211Interface.ned create mode 100644 samples/omnetpp-ned/TsnNetworkBase.ned create mode 160000 vendor/grammars/omnetpp-textmate-ned create mode 100644 vendor/licenses/git_submodule/omnetpp-textmate-ned.dep.yml diff --git a/.gitmodules b/.gitmodules index 7e22d7ba2e..f4c4e95651 100644 --- a/.gitmodules +++ b/.gitmodules @@ -950,6 +950,9 @@ [submodule "vendor/grammars/ocaml.tmbundle"] path = vendor/grammars/ocaml.tmbundle url = https://github.com/textmate/ocaml.tmbundle +[submodule "vendor/grammars/omnetpp-textmate-ned"] + path = vendor/grammars/omnetpp-textmate-ned + url = https://github.com/omnetpp/omnetpp-textmate-ned.git [submodule "vendor/grammars/ooc.tmbundle"] path = vendor/grammars/ooc.tmbundle url = https://github.com/nilium/ooc.tmbundle diff --git a/grammars.yml b/grammars.yml index 4a05ec7ead..4ebbb7fdb2 100644 --- a/grammars.yml +++ b/grammars.yml @@ -887,6 +887,8 @@ vendor/grammars/ocaml.tmbundle: - source.ocaml - source.ocamllex - source.ocamlyacc +vendor/grammars/omnetpp-textmate-ned: +- source.ned vendor/grammars/ooc.tmbundle: - source.ooc vendor/grammars/opa.tmbundle: diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index edd3656f84..057da0d6a6 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -8533,6 +8533,14 @@ nesC: ace_mode: text tm_scope: source.nesc language_id: 417 +omnetpp-ned: + type: programming + extensions: + - ".ned" + color: "#08607c" + tm_scope: source.ned + ace_mode: text + language_id: 924868392 ooc: type: programming color: "#b0b77e" diff --git a/samples/omnetpp-ned/IWirelessInterface.ned b/samples/omnetpp-ned/IWirelessInterface.ned new file mode 100644 index 0000000000..1e2dbf4c22 --- /dev/null +++ b/samples/omnetpp-ned/IWirelessInterface.ned @@ -0,0 +1,20 @@ +// +// Copyright (C) 2020 OpenSim Ltd. +// +// SPDX-License-Identifier: LGPL-3.0-or-later +// + + +package inet.linklayer.contract; + +// +// This module interface is implemented by wireless network interfaces. +// +moduleinterface IWirelessInterface extends INetworkInterface +{ + parameters: + @display("i=block/ifcard"); + gates: + input radioIn @labels(IWirelessSignal); +} + diff --git a/samples/omnetpp-ned/Ieee80211Interface.ned b/samples/omnetpp-ned/Ieee80211Interface.ned new file mode 100644 index 0000000000..d5081ca260 --- /dev/null +++ b/samples/omnetpp-ned/Ieee80211Interface.ned @@ -0,0 +1,133 @@ +// +// Copyright (C) 2006 OpenSim Ltd. +// +// SPDX-License-Identifier: LGPL-3.0-or-later +// + + +package inet.linklayer.ieee80211; + +import inet.linklayer.common.IIeee8021dQosClassifier; +import inet.linklayer.contract.IWirelessInterface; +import inet.linklayer.ieee80211.llc.IIeee80211Llc; +import inet.linklayer.ieee80211.mgmt.IIeee80211Agent; +import inet.linklayer.ieee80211.mgmt.IIeee80211Mgmt; +import inet.linklayer.ieee80211.mib.Ieee80211Mib; +import inet.networklayer.common.NetworkInterface; +import inet.physicallayer.wireless.common.contract.packetlevel.IRadio; + +// +// This module implements an IEEE 802.11 network interface. It implements +// a large subset of the IEEE 802.11 standard, and may use radio models +// and wireless signal representations of varying levels of detail. +// It is also extremely configurable, and its component structure makes +// it easy to experiment with various details of the protocol. +// +// The main components of the interface are the MAC and the radio submodules. +// Most configuration parameters are in the MAC (~Ieee80211Mac) and its +// numerous subcomponents. Most subcomponents are replaceable to facilitate +// experimentation by using typename assignments in the configuration. +// +// The default radio is ~Ieee80211ScalarRadio, but it can be replaced +// with any of several compatible radio types using typename assignments +// in the configuration. Several radio models of varying levels of detail +// are available, from simple unit disk radio models to layered radio models +// that explicitly model forward error correction, scrambling, symbol +// encoding/decoding, etc, and may represent radio signals with a +// multi-dimensional power density function over time and frequency. +// The INET User Guide elaborates on the possibilities. +// +// The type of the management submodule is also configurable. The type of this +// submodule decides whether the interfaces acts as an AP, a STA, or is in ad hoc mode. +// Use ~Ieee80211MgmtSta or ~Ieee80211MgmtStaSimplified for STA, +// ~Ieee80211MgmtAp or ~Ieee80211MgmtApSimplified for AP, and +// ~Ieee80211MgmtAdhoc for ad hoc mode. +// +// The agent submodule is responsible for initiating the process of connecting +// to an AP and similar tasks normally done from "user space". +// +// The LLC submodule is responsible for adding/removing the LLC header on packets. +// +// A classifier is responsible for assigning a 802.1d User Priority (UP) to +// packets and is only needed if QoS is involved. +// +// The clock submodule would allow clock skew modeling -- this is currently not used. +// +// Note about the implementation: +// +// Despite its appearance, Ieee80211Interface is not a plain compound module. +// It has an underlying custom C++ class that inherits from `cModule`. +// +module Ieee80211Interface extends NetworkInterface like IWirelessInterface +{ + parameters: + string interfaceTableModule; + string energySourceModule = default(""); + string opMode @enum("a","b","g(erp)","g(mixed)","n(mixed-2.4Ghz)","p","ac") = default("g(mixed)"); + string address @mutable = default("auto"); // MAC address as hex string (12 hex digits), or + // "auto". "auto" values will be replaced by + // a generated MAC address in init stage 0. + string protocol = default(""); + double bitrate @unit(bps) = default(-1bps); + **.opMode = this.opMode; + **.bitrate = this.bitrate; + mac.modeSet = default(this.opMode); + mac.*.rateSelection.dataFrameBitrate = default(this.bitrate); + radio.signalAnalogRepresentation = default("scalar"); + *.macModule = default(absPath(".mac")); + *.mibModule = default(absPath(".mib")); + *.interfaceTableModule = default(absPath(this.interfaceTableModule)); + *.energySourceModule = default(absPath(this.energySourceModule)); + gates: + input upperLayerIn; + output upperLayerOut; + input radioIn @labels(IWirelessSignal); + submodules: + mib: Ieee80211Mib { + parameters: + @display("p=100,300;is=s"); + } + llc: like IIeee80211Llc { + parameters: + @display("p=300,200"); + } + classifier: like IIeee8021dQosClassifier { + parameters: + @display("p=500,100"); + } + agent: like IIeee80211Agent if typename != "" { + parameters: + @display("p=700,300"); + } + mgmt: like IIeee80211Mgmt { + parameters: + @display("p=500,300"); + } + mac: like IIeee80211Mac { + parameters: + @display("p=300,300"); + } + radio: like IRadio { + parameters: + @display("p=300,400"); + } + connections: + radioIn --> { @display("m=s"); } --> radio.radioIn; + radio.upperLayerIn <-- mac.lowerLayerOut; + radio.upperLayerOut --> mac.lowerLayerIn; + + mac.mgmtOut --> mgmt.macIn; + mac.mgmtIn <-- mgmt.macOut; + + mgmt.agentOut --> agent.mgmtIn if exists(agent); + mgmt.agentIn <-- agent.mgmtOut if exists(agent); + + llc.upperLayerOut --> { @display("m=n"); } --> upperLayerOut; + llc.upperLayerIn <-- { @display("m=n"); } <-- classifier.out; + + llc.lowerLayerOut --> mac.upperLayerIn; + llc.lowerLayerIn <-- mac.upperLayerOut; + + classifier.in <-- { @display("m=n"); } <-- upperLayerIn; +} + diff --git a/samples/omnetpp-ned/TsnNetworkBase.ned b/samples/omnetpp-ned/TsnNetworkBase.ned new file mode 100644 index 0000000000..62499d5ae5 --- /dev/null +++ b/samples/omnetpp-ned/TsnNetworkBase.ned @@ -0,0 +1,30 @@ +// +// Copyright (C) 2020 OpenSim Ltd. +// +// SPDX-License-Identifier: LGPL-3.0-or-later +// + + +package inet.networks.base; + +import inet.linklayer.configurator.gatescheduling.contract.IGateScheduleConfigurator; +import inet.networklayer.configurator.contract.INetworkConfigurator; + +// +// This module serves as a network base module for Time-Sensitive Networking (TSN). +// +network TsnNetworkBase extends WiredNetworkBase +{ + parameters: + **.clock.defaultOverdueClockEventHandlingMode = default("execute"); + submodules: + gateScheduleConfigurator: like IGateScheduleConfigurator if typename != "" { + @display("p=100,500;is=s"); + } + streamRedundancyConfigurator: like INetworkConfigurator if typename != "" { + @display("p=100,600;is=s"); + } + failureProtectionConfigurator: like INetworkConfigurator if typename != "" { + @display("p=100,700;is=s"); + } +} diff --git a/vendor/README.md b/vendor/README.md index 71363f19a7..98a3c133b8 100644 --- a/vendor/README.md +++ b/vendor/README.md @@ -676,6 +676,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting - **mupad:** [ccreutzig/sublime-MuPAD](https://github.com/ccreutzig/sublime-MuPAD) - **nanorc:** [Alhadis/language-etc](https://github.com/Alhadis/language-etc) - **nesC:** [cdwilson/nesC.tmbundle](https://github.com/cdwilson/nesC.tmbundle) +- **omnetpp-ned:** [omnetpp/omnetpp-textmate-ned](https://github.com/omnetpp/omnetpp-textmate-ned) - **ooc:** [nilium/ooc.tmbundle](https://github.com/nilium/ooc.tmbundle) - **q:** [komsit37/sublime-q](https://github.com/komsit37/sublime-q) - **reStructuredText:** [Lukasa/language-restructuredtext](https://github.com/Lukasa/language-restructuredtext) diff --git a/vendor/grammars/omnetpp-textmate-ned b/vendor/grammars/omnetpp-textmate-ned new file mode 160000 index 0000000000..ec083d4ece --- /dev/null +++ b/vendor/grammars/omnetpp-textmate-ned @@ -0,0 +1 @@ +Subproject commit ec083d4ece34d9a804730ffddf01cc1b9589c05f diff --git a/vendor/licenses/git_submodule/omnetpp-textmate-ned.dep.yml b/vendor/licenses/git_submodule/omnetpp-textmate-ned.dep.yml new file mode 100644 index 0000000000..cbaf75fd68 --- /dev/null +++ b/vendor/licenses/git_submodule/omnetpp-textmate-ned.dep.yml @@ -0,0 +1,31 @@ +--- +name: omnetpp-textmate-ned +version: ec083d4ece34d9a804730ffddf01cc1b9589c05f +type: git_submodule +homepage: https://github.com/omnetpp/omnetpp-textmate-ned.git +license: mit +licenses: +- sources: LICENSE + text: | + MIT License + + Copyright (c) 2024 OpenSim Ltd. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +notices: [] From 4321806215f7cd500b08d3a90fa4cae8064c452a Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Mon, 25 Nov 2024 07:44:26 -0800 Subject: [PATCH 03/22] Add TypeSpec (#6775) * Add typespec grammar from microsoft/typespec * Add heuristic and fix microsoft org casing * Add travelingsalesman language registration and heuristic * Update lib/linguist/languages.yml Co-authored-by: John Gardner * Update lib/linguist/heuristics.yml Co-authored-by: John Gardner * Rename samples directory and fix test failures --------- Co-authored-by: John Gardner Co-authored-by: Colin Seymour --- .gitmodules | 3 + grammars.yml | 2 + lib/linguist/heuristics.yml | 6 + lib/linguist/languages.yml | 20 ++++ samples/TSPLIB data/att48.tsp | 105 ++++++++++++++++++ samples/TSPLIB data/dantzig42.tsp | 105 ++++++++++++++++++ samples/TypeSpec/json-schema.tsp | 43 +++++++ samples/TypeSpec/petstore.tsp | 71 ++++++++++++ test/test_heuristics.rb | 7 ++ vendor/README.md | 1 + vendor/grammars/typespec | 1 + .../licenses/git_submodule/typespec.dep.yml | 31 ++++++ 12 files changed, 395 insertions(+) create mode 100644 samples/TSPLIB data/att48.tsp create mode 100644 samples/TSPLIB data/dantzig42.tsp create mode 100644 samples/TypeSpec/json-schema.tsp create mode 100644 samples/TypeSpec/petstore.tsp create mode 160000 vendor/grammars/typespec create mode 100644 vendor/licenses/git_submodule/typespec.dep.yml diff --git a/.gitmodules b/.gitmodules index f4c4e95651..d6aa5444e7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1241,6 +1241,9 @@ [submodule "vendor/grammars/turtle.tmbundle"] path = vendor/grammars/turtle.tmbundle url = https://github.com/peta/turtle.tmbundle +[submodule "vendor/grammars/typespec"] + path = vendor/grammars/typespec + url = https://github.com/microsoft/typespec.git [submodule "vendor/grammars/typst-grammar"] path = vendor/grammars/typst-grammar url = https://github.com/michidk/typst-grammar.git diff --git a/grammars.yml b/grammars.yml index 4ebbb7fdb2..ce72eef3be 100644 --- a/grammars.yml +++ b/grammars.yml @@ -1107,6 +1107,8 @@ vendor/grammars/toml.tmbundle: vendor/grammars/turtle.tmbundle: - source.sparql - source.turtle +vendor/grammars/typespec: +- source.tsp vendor/grammars/typst-grammar: - source.typst vendor/grammars/verilog.tmbundle: diff --git a/lib/linguist/heuristics.yml b/lib/linguist/heuristics.yml index 67891bd2ab..c8125abfde 100644 --- a/lib/linguist/heuristics.yml +++ b/lib/linguist/heuristics.yml @@ -772,6 +772,12 @@ disambiguations: - language: XML pattern: ' { + @statusCode _: 304; + @body body: Body; +} + +@friendlyName("{name}ListResults", Item) +model ResponsePage { + items: Item[]; + nextLink?: string; +} + +model PetId { + @path petId: int32; +} + +@doc("Manage your pets.") +@route("/pets") +namespace Pets { + @doc("Delete a pet.") + @delete + op delete(...PetId): OkResponse | Error; + + @fancyDoc("List pets.") + op list(@query nextLink?: string): ResponsePage | Error; + + @doc("Returns a pet. Supports eTags.") + op read(...PetId): Pet | (NotModifiedResponse & Pet) | Error; + + @post op create(@body pet: Pet): Pet | Error; +} + +@route("/pets/{petId}/toys") +namespace ListPetToysResponse { + op list(@path petId: string, @query nameFilter: string): ResponsePage | Error; +} \ No newline at end of file diff --git a/test/test_heuristics.rb b/test/test_heuristics.rb index 8277ceba53..5e8825b8cf 100755 --- a/test/test_heuristics.rb +++ b/test/test_heuristics.rb @@ -1023,6 +1023,13 @@ def test_ts_by_heuristics }) end + def test_tsp_by_heuristics + assert_heuristics({ + "TypeSpec" => all_fixtures("TypeSpec", "*.tsp"), + "TSPLIB data" => all_fixtures("TSPLIB data", "*.tsp") + }) + end + def test_tst_by_heuristics assert_heuristics({ "GAP" => all_fixtures("GAP", "*.tst"), diff --git a/vendor/README.md b/vendor/README.md index 98a3c133b8..e1e31dc7d0 100644 --- a/vendor/README.md +++ b/vendor/README.md @@ -590,6 +590,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting - **Twig:** [Anomareh/PHP-Twig.tmbundle](https://github.com/Anomareh/PHP-Twig.tmbundle) - **Type Language:** [goodmind/language-typelanguage](https://github.com/goodmind/language-typelanguage) - **TypeScript:** [tree-sitter/tree-sitter-typescript](https://github.com/tree-sitter/tree-sitter-typescript) 🐌 +- **TypeSpec:** [microsoft/typespec](https://github.com/microsoft/typespec) - **Typst:** [michidk/typst-grammar](https://github.com/michidk/typst-grammar) - **Unified Parallel C:** [textmate/c.tmbundle](https://github.com/textmate/c.tmbundle) - **Unity3D Asset:** [atom/language-yaml](https://github.com/atom/language-yaml) diff --git a/vendor/grammars/typespec b/vendor/grammars/typespec new file mode 160000 index 0000000000..ce9c567e5b --- /dev/null +++ b/vendor/grammars/typespec @@ -0,0 +1 @@ +Subproject commit ce9c567e5bfb441bb6415699a6b6fa797bc08f2e diff --git a/vendor/licenses/git_submodule/typespec.dep.yml b/vendor/licenses/git_submodule/typespec.dep.yml new file mode 100644 index 0000000000..9e4cd91a61 --- /dev/null +++ b/vendor/licenses/git_submodule/typespec.dep.yml @@ -0,0 +1,31 @@ +--- +name: typespec +version: ce9c567e5bfb441bb6415699a6b6fa797bc08f2e +type: git_submodule +homepage: https://github.com/Microsoft/typespec.git +license: mit +licenses: +- sources: LICENSE + text: |2 + MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE +notices: [] From bc6e2c838b983752733bc1736fc6a9170db1719d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Casas?= <57921784+vicasas@users.noreply.github.com> Date: Mon, 25 Nov 2024 12:44:36 -0300 Subject: [PATCH 04/22] Update heuristics to fallback to TSX language if .tsx file is not XML (#7049) Fix syntax highlighting for .tsx files in the TSX language Co-authored-by: Colin Seymour --- lib/linguist/heuristics.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/linguist/heuristics.yml b/lib/linguist/heuristics.yml index c8125abfde..669f617fad 100644 --- a/lib/linguist/heuristics.yml +++ b/lib/linguist/heuristics.yml @@ -786,10 +786,9 @@ disambiguations: - language: Scilab - extensions: ['.tsx'] rules: - - language: TSX - pattern: '^\s*(import.+(from\s+|require\()[''"]react|\/\/\/\s* Date: Mon, 25 Nov 2024 15:45:46 +0000 Subject: [PATCH 05/22] Add `.clangd` as a filename for YAML (#7063) * Add .clangd as a filename for YAML * Add a sample YAML file with filename .clangd --- lib/linguist/languages.yml | 1 + samples/YAML/filenames/.clangd | 41 ++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 samples/YAML/filenames/.clangd diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index ba465a5773..46e10075f0 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -8275,6 +8275,7 @@ YAML: filenames: - ".clang-format" - ".clang-tidy" + - ".clangd" - ".gemrc" - CITATION.cff - glide.lock diff --git a/samples/YAML/filenames/.clangd b/samples/YAML/filenames/.clangd new file mode 100644 index 0000000000..38dbc328ac --- /dev/null +++ b/samples/YAML/filenames/.clangd @@ -0,0 +1,41 @@ +CompileFlags: + CompilationDatabase: "cmake-build" + Add: [ + -pedantic, + -Wall, + -Wextra, + -Wconversion, + -Wshadow, + -Wfloat-equal, + -Wmisleading-indentation, + -Wimplicit-fallthrough, + ] +Diagnostics: + Suppress: + - variadic_device_fn + - attributes_not_allowed + UnusedIncludes: Strict + ClangTidy: + Add: ['*'] + Remove: + - abseil-* + - altera-* + - android-* + - fuchsia-* + - google-* + - llvm* + - modernize-use-trailing-return-type + - zircon-* + - readability-else-after-return + - readability-static-accessed-through-instance + - readability-avoid-const-params-in-decls + - cppcoreguidelines-non-private-member-variables-in-classes + - misc-non-private-member-variables-in-classes + CheckOptions: + readability-identifier-naming.VariableCase: lower_case + readability-identifier-naming.FunctionCase: lower_case + readability-identifier-naming.ClassCase: Leading_upper_snake_case + readability-identifier-naming.StructCase: Leading_upper_snake_case + cppcoreguidelines-init-variables.IncludeStyle: google +InlayHints: + BlockEnd: true From bfd336d62888b647c531a9eb8261f10317642f0d Mon Sep 17 00:00:00 2001 From: Spenser Black Date: Mon, 25 Nov 2024 10:45:52 -0500 Subject: [PATCH 06/22] Add `.ignore` as ignore list filename (#7070) * Add `.ignore` as ignore list filename * Create `.ignore` sample --- lib/linguist/languages.yml | 1 + samples/Ignore List/filenames/.ignore | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 samples/Ignore List/filenames/.ignore diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 46e10075f0..1d2a9b5530 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -3115,6 +3115,7 @@ Ignore List: - ".eleventyignore" - ".eslintignore" - ".gitignore" + - ".ignore" - ".markdownlintignore" - ".nodemonignore" - ".npmignore" diff --git a/samples/Ignore List/filenames/.ignore b/samples/Ignore List/filenames/.ignore new file mode 100644 index 0000000000..b1e63814bb --- /dev/null +++ b/samples/Ignore List/filenames/.ignore @@ -0,0 +1,6 @@ +.git/ +# Prevent tooling from reading vendored files +vendor/ +dist/ + +*.log \ No newline at end of file From f241cf004322548cf75f22d312cefe7e12c61652 Mon Sep 17 00:00:00 2001 From: Colin Seymour Date: Mon, 25 Nov 2024 15:52:08 +0000 Subject: [PATCH 07/22] Add SSH config aliases (#7057) --- lib/linguist/languages.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 1d2a9b5530..bfb8a4c6cc 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -6524,6 +6524,11 @@ SRecode Template: SSH Config: type: data group: INI + aliases: + - sshconfig + - sshdconfig + - ssh_config + - sshd_config filenames: - ssh-config - ssh_config From 21d356d5f46ed703c9e1fc7fac9600d86a49629c Mon Sep 17 00:00:00 2001 From: Colin Seymour Date: Mon, 25 Nov 2024 15:52:16 +0000 Subject: [PATCH 08/22] Replace CMake grammar (#7060) --- .gitmodules | 6 ++-- grammars.yml | 6 ++-- vendor/README.md | 2 +- vendor/grammars/cmake.tmbundle | 1 - vendor/grammars/vscode-cmake-tools | 1 + .../git_submodule/cmake.tmbundle.dep.yml | 15 --------- .../git_submodule/vscode-cmake-tools.dep.yml | 31 +++++++++++++++++++ 7 files changed, 39 insertions(+), 23 deletions(-) delete mode 160000 vendor/grammars/cmake.tmbundle create mode 160000 vendor/grammars/vscode-cmake-tools delete mode 100644 vendor/licenses/git_submodule/cmake.tmbundle.dep.yml create mode 100644 vendor/licenses/git_submodule/vscode-cmake-tools.dep.yml diff --git a/.gitmodules b/.gitmodules index d6aa5444e7..cdf1bdedb1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -389,9 +389,6 @@ [submodule "vendor/grammars/clarity.tmbundle"] path = vendor/grammars/clarity.tmbundle url = https://github.com/hirosystems/clarity.tmbundle.git -[submodule "vendor/grammars/cmake.tmbundle"] - path = vendor/grammars/cmake.tmbundle - url = https://github.com/textmate/cmake.tmbundle [submodule "vendor/grammars/code-peggy-language"] path = vendor/grammars/code-peggy-language url = https://github.com/peggyjs/code-peggy-language.git @@ -1277,6 +1274,9 @@ [submodule "vendor/grammars/vscode-cadence"] path = vendor/grammars/vscode-cadence url = https://github.com/onflow/vscode-cadence.git +[submodule "vendor/grammars/vscode-cmake-tools"] + path = vendor/grammars/vscode-cmake-tools + url = https://github.com/microsoft/vscode-cmake-tools.git [submodule "vendor/grammars/vscode-codeql"] path = vendor/grammars/vscode-codeql url = https://github.com/github/vscode-codeql diff --git a/grammars.yml b/grammars.yml index ce72eef3be..1e3743a9b3 100644 --- a/grammars.yml +++ b/grammars.yml @@ -318,9 +318,6 @@ vendor/grammars/circom-highlighting-vscode: - source.circom vendor/grammars/clarity.tmbundle: - source.clar -vendor/grammars/cmake.tmbundle: -- source.cache.cmake -- source.cmake vendor/grammars/code-peggy-language: - inline.peggy - source.peggy @@ -1140,6 +1137,9 @@ vendor/grammars/vscode-caddyfile: vendor/grammars/vscode-cadence: - markdown.cadence.codeblock - source.cadence +vendor/grammars/vscode-cmake-tools: +- source.cmake +- source.cmakecache vendor/grammars/vscode-codeql: - source.ql vendor/grammars/vscode-cue: diff --git a/vendor/README.md b/vendor/README.md index e1e31dc7d0..30e816c40b 100644 --- a/vendor/README.md +++ b/vendor/README.md @@ -79,7 +79,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting - **CAP CDS:** [SAP/cds-textmate-grammar](https://github.com/SAP/cds-textmate-grammar) - **CIL:** [google/selinux-policy-languages](https://github.com/google/selinux-policy-languages) - **CLIPS:** [psicomante/CLIPS-sublime](https://github.com/psicomante/CLIPS-sublime) -- **CMake:** [textmate/cmake.tmbundle](https://github.com/textmate/cmake.tmbundle) +- **CMake:** [microsoft/vscode-cmake-tools](https://github.com/microsoft/vscode-cmake-tools) - **COBOL:** [spgennard/vscode_cobol](https://github.com/spgennard/vscode_cobol) - **CODEOWNERS:** [Alhadis/language-etc](https://github.com/Alhadis/language-etc) - **COLLADA:** [textmate/xml.tmbundle](https://github.com/textmate/xml.tmbundle) diff --git a/vendor/grammars/cmake.tmbundle b/vendor/grammars/cmake.tmbundle deleted file mode 160000 index 1421c6ba47..0000000000 --- a/vendor/grammars/cmake.tmbundle +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1421c6ba47ba697742d615e92852cfe106e0879e diff --git a/vendor/grammars/vscode-cmake-tools b/vendor/grammars/vscode-cmake-tools new file mode 160000 index 0000000000..3305ff22fc --- /dev/null +++ b/vendor/grammars/vscode-cmake-tools @@ -0,0 +1 @@ +Subproject commit 3305ff22fc000533f67b66bb107f53401e42bb3c diff --git a/vendor/licenses/git_submodule/cmake.tmbundle.dep.yml b/vendor/licenses/git_submodule/cmake.tmbundle.dep.yml deleted file mode 100644 index 7809d4d9ce..0000000000 --- a/vendor/licenses/git_submodule/cmake.tmbundle.dep.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -type: git_submodule -name: cmake.tmbundle -version: 1421c6ba47ba697742d615e92852cfe106e0879e -license: permissive -licenses: -- text: "If not otherwise specified (see below), files in this repository fall under - the following license:\n\n\tPermission to copy, use, modify, sell and distribute - this\n\tsoftware is granted. This software is provided \"as is\" without\n\texpress - or implied warranty, and with no claim as to its\n\tsuitability for any purpose.\n\nAn - exception is made for files in readable text which contain their own license information, - or files where an accompanying file exists (in the same directory) with a “-license” - suffix added to the base-name name of the original file, and an extension of txt, - html, or similar. For example “tidy” is accompanied by “tidy-license.txt”." -notices: [] diff --git a/vendor/licenses/git_submodule/vscode-cmake-tools.dep.yml b/vendor/licenses/git_submodule/vscode-cmake-tools.dep.yml new file mode 100644 index 0000000000..fa5c6fde99 --- /dev/null +++ b/vendor/licenses/git_submodule/vscode-cmake-tools.dep.yml @@ -0,0 +1,31 @@ +--- +name: vscode-cmake-tools +version: 3305ff22fc000533f67b66bb107f53401e42bb3c +type: git_submodule +homepage: https://github.com/microsoft/vscode-cmake-tools.git +license: mit +licenses: +- sources: LICENSE.txt + text: | + MIT License + + Copyright (c) 2018 vector-of-bool + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +notices: [] From cad5a8bdde5933fd825e21d9c9e1fe28e499a0e8 Mon Sep 17 00:00:00 2001 From: Martin Leduc <31558169+DecimalTurn@users.noreply.github.com> Date: Mon, 25 Nov 2024 10:46:18 -0500 Subject: [PATCH 09/22] Fix FreeBASIC capitalization (#7072) --- lib/linguist/heuristics.yml | 4 ++-- lib/linguist/languages.yml | 2 +- samples/{FreeBasic => FreeBASIC}/WinGUI template.bi | 0 samples/{FreeBasic => FreeBASIC}/array_clearobj.bas | 0 samples/{FreeBasic => FreeBASIC}/ir.bas | 0 samples/{FreeBasic => FreeBASIC}/makescript.bas | 0 test/test_heuristics.rb | 4 ++-- vendor/README.md | 2 +- 8 files changed, 6 insertions(+), 6 deletions(-) rename samples/{FreeBasic => FreeBASIC}/WinGUI template.bi (100%) rename samples/{FreeBasic => FreeBASIC}/array_clearobj.bas (100%) rename samples/{FreeBasic => FreeBASIC}/ir.bas (100%) rename samples/{FreeBasic => FreeBASIC}/makescript.bas (100%) diff --git a/lib/linguist/heuristics.yml b/lib/linguist/heuristics.yml index 669f617fad..21a64eabfa 100644 --- a/lib/linguist/heuristics.yml +++ b/lib/linguist/heuristics.yml @@ -90,7 +90,7 @@ disambiguations: rules: - language: B4X pattern: '\A\W{0,3}(?:.*(?:\r?\n|\r)){0,9}B4(?:J|A|R|i)=true' - - language: FreeBasic + - language: FreeBASIC pattern: '^[ \t]*#(?i)(?:define|endif|endmacro|ifn?def|include|lang|macro)(?:$|\s)' - language: BASIC pattern: '\A\s*\d' @@ -120,7 +120,7 @@ disambiguations: pattern: '(>\+>|>\+<)' - extensions: ['.bi'] rules: - - language: FreeBasic + - language: FreeBASIC pattern: '^[ \t]*#(?i)(?:define|endif|endmacro|ifn?def|if|include|lang|macro)(?:$|\s)' - extensions: ['.bs'] rules: diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index bfb8a4c6cc..d2941c9df6 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -2167,7 +2167,7 @@ Fortran Free Form: codemirror_mode: fortran codemirror_mime_type: text/x-fortran language_id: 761352333 -FreeBasic: +FreeBASIC: type: programming color: "#141AC9" extensions: diff --git a/samples/FreeBasic/WinGUI template.bi b/samples/FreeBASIC/WinGUI template.bi similarity index 100% rename from samples/FreeBasic/WinGUI template.bi rename to samples/FreeBASIC/WinGUI template.bi diff --git a/samples/FreeBasic/array_clearobj.bas b/samples/FreeBASIC/array_clearobj.bas similarity index 100% rename from samples/FreeBasic/array_clearobj.bas rename to samples/FreeBASIC/array_clearobj.bas diff --git a/samples/FreeBasic/ir.bas b/samples/FreeBASIC/ir.bas similarity index 100% rename from samples/FreeBasic/ir.bas rename to samples/FreeBASIC/ir.bas diff --git a/samples/FreeBasic/makescript.bas b/samples/FreeBASIC/makescript.bas similarity index 100% rename from samples/FreeBasic/makescript.bas rename to samples/FreeBASIC/makescript.bas diff --git a/test/test_heuristics.rb b/test/test_heuristics.rb index 5e8825b8cf..3aa803f895 100755 --- a/test/test_heuristics.rb +++ b/test/test_heuristics.rb @@ -276,7 +276,7 @@ def test_asy_by_heuristics def test_bas_by_heuristics assert_heuristics({ "B4X" => all_fixtures("B4X", "*.bas"), - "FreeBasic" => all_fixtures("FreeBasic", "*.bas"), + "FreeBASIC" => all_fixtures("FreeBASIC", "*.bas"), "BASIC" => all_fixtures("BASIC", "*.bas"), "VBA" => all_fixtures("VBA", "*.bas"), "Visual Basic 6.0" => all_fixtures("Visual Basic 6.0", "*.bas") @@ -301,7 +301,7 @@ def test_bf_by_heuristics def test_bi_by_heuristics assert_heuristics({ - "FreeBasic" => all_fixtures("FreeBasic", "*.bi") + "FreeBASIC" => all_fixtures("FreeBASIC", "*.bi") }) end diff --git a/vendor/README.md b/vendor/README.md index 30e816c40b..a809bc07c7 100644 --- a/vendor/README.md +++ b/vendor/README.md @@ -185,7 +185,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting - **Forth:** [textmate/forth.tmbundle](https://github.com/textmate/forth.tmbundle) - **Fortran:** [textmate/fortran.tmbundle](https://github.com/textmate/fortran.tmbundle) - **Fortran Free Form:** [textmate/fortran.tmbundle](https://github.com/textmate/fortran.tmbundle) -- **FreeBasic:** [peters-ben-0007/VBDotNetSyntax](https://github.com/peters-ben-0007/VBDotNetSyntax) +- **FreeBASIC:** [peters-ben-0007/VBDotNetSyntax](https://github.com/peters-ben-0007/VBDotNetSyntax) - **FreeMarker:** [freemarker/FreeMarker.tmbundle](https://github.com/freemarker/FreeMarker.tmbundle) - **Frege:** [atom-haskell/language-haskell](https://github.com/atom-haskell/language-haskell) - **Futhark:** [Alhadis/language-etc](https://github.com/Alhadis/language-etc) From c637573ce547ac1ecf0de4bb8ac73f0bbbab0285 Mon Sep 17 00:00:00 2001 From: Martin Leduc <31558169+DecimalTurn@users.noreply.github.com> Date: Mon, 25 Nov 2024 10:46:25 -0500 Subject: [PATCH 10/22] Improvements to VBA's Heuristic (#7079) * Revert "Fix VBA heuristic for Access Option Compare statement (#6742)" This reverts commit 94e7b20d38dcf7e8243428a4149ad9d8dd3ae17f. * Add Word objects This should fix detection in this file: https://github.com/oscarsun72/WordVBA/blob/master/TableOps.bas * Simplify VBA heuristic + sample * Add VB6 sample with "Option Compare Binary" * Add VBA Word sample --- lib/linguist/heuristics.yml | 8 +- samples/VBA/AccUnitLoaderConfigProcedures.bas | 114 ---------- samples/VBA/QuickCards.bas | 205 ++++++++++++++++++ samples/VBA/d_WordCmds.bas | 134 ++++++++++++ samples/Visual Basic 6.0/modFrm.bas | 40 ++++ 5 files changed, 382 insertions(+), 119 deletions(-) delete mode 100644 samples/VBA/AccUnitLoaderConfigProcedures.bas create mode 100644 samples/VBA/QuickCards.bas create mode 100644 samples/VBA/d_WordCmds.bas create mode 100644 samples/Visual Basic 6.0/modFrm.bas diff --git a/lib/linguist/heuristics.yml b/lib/linguist/heuristics.yml index 21a64eabfa..d5c20038f9 100644 --- a/lib/linguist/heuristics.yml +++ b/lib/linguist/heuristics.yml @@ -95,9 +95,7 @@ disambiguations: - language: BASIC pattern: '\A\s*\d' - language: VBA - and: - - named_pattern: vb-module - - named_pattern: vba + named_pattern: vba - language: Visual Basic 6.0 named_pattern: vb-module - extensions: ['.bb'] @@ -957,12 +955,12 @@ named_patterns: - '^[ ]*#If Win64\b' - '^[ ]*(?:Dim|Const) [0-9a-zA-Z_]*[ ]*As Long(?:Ptr|Long)\b' # Top module declarations unique to VBA - - '^[ ]*Option (?:Private Module|Compare (?:Database|Text|Binary))\b' + - '^[ ]*Option (?:Private Module|Compare Database)\b' # General VBA libraries and objects - '(?: |\()(?:Access|Excel|Outlook|PowerPoint|Visio|Word|VBIDE)\.\w' - '\b(?:(?:Active)?VBProjects?|VBComponents?|Application\.(?:VBE|ScreenUpdating))\b' # AutoCAD, Outlook, PowerPoint and Word objects - - '\b(?:ThisDrawing|AcadObject|Active(?:Explorer|Inspector|Window\.Presentation|Presentation|Document)|Selection\.(?:Find|Paragraphs))\b' + - '\b(?:ThisDrawing|AcadObject|Active(?:Explorer|Inspector|Window\.Presentation|Presentation|Document)|Selection\.(?:Document|Find|Paragraphs|Range))\b' # Excel objects - '\b(?:(?:This|Active)?Workbooks?|Worksheets?|Active(?:Sheet|Chart|Cell)|WorksheetFunction)\b' - '\b(?:Range\(".*|Cells\([0-9a-zA-Z_]*, (?:[0-9a-zA-Z_]*|"[a-zA-Z]{1,3}"))\)' diff --git a/samples/VBA/AccUnitLoaderConfigProcedures.bas b/samples/VBA/AccUnitLoaderConfigProcedures.bas deleted file mode 100644 index 9c02d03875..0000000000 --- a/samples/VBA/AccUnitLoaderConfigProcedures.bas +++ /dev/null @@ -1,114 +0,0 @@ -Attribute VB_Name = "AccUnitLoaderConfigProcedures" -Option Explicit -Option Compare Text - -Public Sub AddAccUnitTlbReference() - RemoveAccUnitTlbReference - CurrentVbProject.References.AddFromFile CurrentAccUnitConfiguration.AccUnitDllPath & "\AccessCodeLib.AccUnit.tlb" -End Sub - -Public Sub RemoveAccUnitTlbReference() - - Dim ref As Reference - Dim RefName As String - - With CurrentVbProject - For Each ref In .References -On Error Resume Next - RefName = ref.Name - If Err.Number <> 0 Then - Err.Clear - RefName = vbNullString - End If -On Error GoTo 0 - If RefName = "AccUnit" Then - .References.Remove ref - Exit Sub - End If - Next - End With - -End Sub - -Public Sub InsertFactoryModule() - - Dim Configurator As AccUnit.Configurator - - With New AccUnitLoaderFactory - Set Configurator = .Configurator - End With - - Configurator.InsertAccUnitLoaderFactoryModule AccUnitTlbReferenceExists, True, CurrentVbProject, Application - Set Configurator = Nothing - -On Error Resume Next -' Application.RunCommand acCmdCompileAndSaveAllModules - -End Sub - -Private Function AccUnitTlbReferenceExists() As Boolean - - Dim ref As Reference - Dim RefName As String - - For Each ref In CurrentVbProject.References -On Error Resume Next - RefName = ref.Name - If Err.Number <> 0 Then - Err.Clear - RefName = vbNullString - End If -On Error GoTo 0 - If RefName = "AccUnit" Then - AccUnitTlbReferenceExists = True - Exit Function - End If - Next - -End Function - -Public Sub ImportTestClasses() - - Dim Configurator As AccUnit.Configurator - - With New AccUnitLoaderFactory - Set Configurator = .Configurator - End With - - Configurator.InsertAccUnitLoaderFactoryModule AccUnitTlbReferenceExists, False, CurrentVbProject, Application - Configurator.ImportTestClasses - Set Configurator = Nothing - -On Error Resume Next -' Application.RunCommand acCmdCompileAndSaveAllModules - -End Sub - -Public Sub ExportTestClasses() - - Dim Configurator As AccUnit.Configurator - - With New AccUnitLoaderFactory - Set Configurator = .Configurator - End With - - Configurator.ExportTestClasses - Set Configurator = Nothing - -End Sub - -Public Sub RemoveTestEnvironment(ByVal RemoveTestModules As Boolean) - - Dim Configurator As AccUnit.Configurator - - With New AccUnitLoaderFactory - Set Configurator = .Configurator - End With - - Configurator.RemoveTestEnvironment RemoveTestModules, , CurrentVbProject - Set Configurator = Nothing - -On Error Resume Next -' Application.RunCommand acCmdCompileAndSaveAllModules - -End Sub diff --git a/samples/VBA/QuickCards.bas b/samples/VBA/QuickCards.bas new file mode 100644 index 0000000000..c370056d17 --- /dev/null +++ b/samples/VBA/QuickCards.bas @@ -0,0 +1,205 @@ +Attribute VB_Name = "QuickCards" +Option Explicit + +Public Sub AddQuickCard() + Dim Profile As String + Dim t As Template + Dim Name As String + Dim i As Long + Dim j As Long + Dim k As Long + + On Error GoTo Handler + + If Selection.Start = Selection.End Then + MsgBox "You must select some text to save a Quick Card", vbOKOnly + Exit Sub + End If + + Name = InputBox("What shortcut word/phrase do you want to use for your Quick Card? Usually this is the author's last name.", "Add Quick Card", "") + If Name = "" Then Exit Sub + + Profile = GetSetting("Verbatim", "QuickCards", "QuickCardsProfile", "Verbatim1") + If Not Profile Like "Verbatim*" Then Profile = "Verbatim1" + + Set t = ActiveDocument.AttachedTemplate + + For i = 1 To t.BuildingBlockTypes.Count + If t.BuildingBlockTypes.Item(i).Name = "Custom 1" Then + For j = 1 To t.BuildingBlockTypes.Item(i).Categories.Count + If t.BuildingBlockTypes.Item(i).Categories.Item(j).Name = Profile Then + For k = 1 To t.BuildingBlockTypes.Item(i).Categories.Item(j).BuildingBlocks.Count + If LCase$(t.BuildingBlockTypes.Item(i).Categories.Item(j).BuildingBlocks.Item(k).Name) = LCase$(Name) Then + MsgBox "There's already a Quick Card with that name, try again with a different name!", vbOKOnly, "Failed To Add Quick Card" + Exit Sub + End If + Next k + End If + Next j + End If + Next i + + t.BuildingBlockEntries.Add Name, wdTypeCustom1, Profile, Selection.Range + + t.Save + + Ribbon.RefreshRibbon + + MsgBox "Successfully created Quick Card with the shortcut """ & Name & """" + + Set t = Nothing + Exit Sub + +Handler: + Set t = Nothing + MsgBox "Error " & Err.Number & ": " & Err.Description +End Sub + +'@Ignore ProcedureNotUsed +Public Sub InsertCurrentQuickCard() + On Error Resume Next + Selection.Range.InsertAutoText + On Error GoTo 0 +End Sub + +Public Sub InsertQuickCard(ByRef QuickCardName As String) + Dim Profile As String + Dim t As Template + Dim i As Long + Dim j As Long + Dim k As Long + + On Error GoTo Handler + + Profile = GetSetting("Verbatim", "QuickCards", "QuickCardsProfile", "Verbatim1") + If Not Profile Like "Verbatim*" Then Profile = "Verbatim1" + + Set t = ActiveDocument.AttachedTemplate + + For i = 1 To t.BuildingBlockTypes.Count + If t.BuildingBlockTypes.Item(i).Name = "Custom 1" Then + For j = 1 To t.BuildingBlockTypes.Item(i).Categories.Count + If t.BuildingBlockTypes.Item(i).Categories.Item(j).Name = Profile Then + For k = 1 To t.BuildingBlockTypes.Item(i).Categories.Item(j).BuildingBlocks.Count + If LCase$(t.BuildingBlockTypes.Item(i).Categories.Item(j).BuildingBlocks.Item(k).Name) = LCase$(QuickCardName) Then + t.BuildingBlockTypes.Item(i).Categories.Item(j).BuildingBlocks.Item(k).Insert Selection.Range, True + End If + Next k + End If + Next j + End If + Next i + + Set t = Nothing + Exit Sub + +Handler: + Set t = Nothing + MsgBox "Error " & Err.Number & ": " & Err.Description +End Sub + +Public Sub DeleteQuickCard(Optional ByRef QuickCardName As String) + Dim Profile As String + Dim t As Template + Dim i As Long + Dim j As Long + Dim k As Long + + On Error GoTo Handler + + If QuickCardName <> "" Or IsNull(QuickCardName) Then + If MsgBox("Are you sure you want to delete the Quick Card """ & QuickCardName & """? This cannot be reversed.", vbYesNo, "Are you sure?") = vbNo Then Exit Sub + Else + If MsgBox("Are you sure you want to delete all saved Quick Cards? This cannot be reversed.", vbYesNo, "Are you sure?") = vbNo Then Exit Sub + End If + + Profile = GetSetting("Verbatim", "QuickCards", "QuickCardsProfile", "Verbatim1") + If Not Profile Like "Verbatim*" Then Profile = "Verbatim1" + + Set t = ActiveDocument.AttachedTemplate + + ' Delete all building blocks in the Custom 1/Verbatim category + For i = 1 To t.BuildingBlockTypes.Count + If t.BuildingBlockTypes.Item(i).Name = "Custom 1" Then + For j = 1 To t.BuildingBlockTypes.Item(i).Categories.Count + If t.BuildingBlockTypes.Item(i).Categories.Item(j).Name = Profile Then + For k = t.BuildingBlockTypes.Item(i).Categories.Item(j).BuildingBlocks.Count To 1 Step -1 + ' If name provided, delete just that building block, otherwise delete everything in the category + If QuickCardName <> "" Or IsNull(QuickCardName) Then + If t.BuildingBlockTypes.Item(i).Categories.Item(j).BuildingBlocks.Item(k).Name = QuickCardName Then + t.BuildingBlockTypes.Item(i).Categories.Item(j).BuildingBlocks.Item(k).Delete + End If + Else + t.BuildingBlockTypes.Item(i).Categories.Item(j).BuildingBlocks.Item(k).Delete + End If + Next k + End If + Next j + End If + Next i + + t.Save + Set t = Nothing + + Exit Sub + +Handler: + Set t = Nothing + MsgBox "Error " & Err.Number & ": " & Err.Description +End Sub + +'@Ignore ParameterNotUsed, ProcedureNotUsed +'@Ignore ProcedureCanBeWrittenAsFunction +Public Sub GetQuickCardsContent(ByVal c As IRibbonControl, ByRef returnedVal As Variant) +' Get content for dynamic menu for Quick Cards + Dim Profile As String + Dim t As Template + Dim i As Long + Dim j As Long + Dim k As Long + Dim xml As String + Dim QuickCardName As String + Dim DisplayName As String + + On Error Resume Next + + Profile = GetSetting("Verbatim", "QuickCards", "QuickCardsProfile", "Verbatim1") + If Not Profile Like "Verbatim*" Then Profile = "Verbatim1" + + Set t = ActiveDocument.AttachedTemplate + + ' Start the menu + xml = "" + + ' Populate the list of current Quick Cards in the Custom 1 / Verbatim gallery + For i = 1 To t.BuildingBlockTypes.Count + If t.BuildingBlockTypes.Item(i).Name = "Custom 1" Then + For j = 1 To t.BuildingBlockTypes.Item(i).Categories.Count + If t.BuildingBlockTypes.Item(i).Categories.Item(j).Name = Profile Then + For k = 1 To t.BuildingBlockTypes.Item(i).Categories.Item(j).BuildingBlocks.Count + QuickCardName = t.BuildingBlockTypes.Item(i).Categories.Item(j).BuildingBlocks.Item(k).Name + DisplayName = Strings.OnlySafeChars(QuickCardName) + xml = xml & "" + + Set t = Nothing + + returnedVal = xml + + On Error GoTo 0 + + Exit Sub +End Sub + +'@Ignore ProcedureNotUsed +Public Sub InsertQuickCardFromRibbon(ByVal c As IRibbonControl) + QuickCards.InsertQuickCard c.Tag +End Sub diff --git a/samples/VBA/d_WordCmds.bas b/samples/VBA/d_WordCmds.bas new file mode 100644 index 0000000000..3273602da8 --- /dev/null +++ b/samples/VBA/d_WordCmds.bas @@ -0,0 +1,134 @@ +Global ICFWD As ICFWRD 'required to have ICF_FN class module as well +Global ICF As ICFXL + +Sub Test456() + Set ICFWD = New ICFWRD 'required to run intialize scripts at beginning of class + + 'setup +' ICFWD.WordDocument_SelectActive + ICFWD.WordDocument_Add "C:\Documents and Settings\16955\Desktop\test", "newdoc", "doc" + ICFWD.WordCloseFile False + ICFWD.WordOptionsManual + ICFWD.WordVisible + ICFWD.PageMargins 2, 2, 1, 1 + ICFWD.PageLandscape + + ICFWD.AddPictureInline "C:\Documents and Settings\16955\My Documents\My Pictures\mo_100107c.jpg", 0.5, True + ICFWD.AddPictureShape "C:\Documents and Settings\16955\My Documents\My Pictures\mo_100107c.jpg", 0.5, True + + 'exit + ICFWD.WordVisible + ICFWD.SaveFile + ICFWD.WordOptionsAutomatic + ICFWD.WordCloseFile False + +End Sub + + + +'Code used to print something to Word +Private Sub CommandCommands() + + 'DEBUG W/ OPEN DOCUMENT + Set appWD = Word.Application + + '/----------------------------------\ + '| | + '| GENERAL FORMATTING OF DOC | + '| | + '\----------------------------------/ + + 'STANDARDIZE PARAGRAPH FORMAT (REMOVE EXTRA SPACES, ETC) + StandardParagraphFormat + + '/----------------------------------\ + '| | + '| PRINTING AND FORMATTING TEXT | + '| | + '\----------------------------------/ + 'Print Word + WRD_PrintBoldText "Example header: " + WRD_PrintText ExcelWB.Sheets("Appendix Tables").Range("R24") & ", [ADD STATE]" + WRD_NextLine + WRD_PageBreak + + 'FORMATTING + appWD.Selection.Style = "Normal" + appWD.Selection.Font.Size = 12 + appWD.Selection.Font.Bold = True + appWD.Selection.Font.Italic = True + appWD.Selection.Font.Name = "Calibri" + appWD.Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter + + '/----------------------------------\ + '| | + '| TABLES AND TABLE EDITS | + '| | + '\----------------------------------/ + + 'CENTER TABLE + appWD.Selection.Tables(1).Rows.Alignment = wdAlignRowCenter + + 'TABLE FORMATTING + appWD.Selection.Tables(1).Select + StandardParagraphFormat + + 'MERGE CELLS + appWD.Selection.Tables(1).Rows(1).Select + appWD.Selection.Cells.Merge + + 'COL WIDTH + appWD.Selection.Tables(1).Columns(1).SetWidth ColumnWidth:=Application.InchesToPoints(1.5), rulerstyle:=wdAdjustNone + appWD.Selection.Tables(1).Cell(2, 1).SetWidth ColumnWidth:=Application.InchesToPoints(0.35), rulerstyle:=wdAdjustNone + + 'ROW HEIGHT + appWD.Selection.Tables(1).Cell(2, j).SetHeight RowHeight:=Application.InchesToPoints(1), HeightRule:=wdRowHeightExactly + + 'VERTICAL CENTER TEXT + appWD.Selection.Tables(1).Cell(2, j).VerticalAlignment = wdCellAlignVerticalCenter + + 'HORIZONTAL ALIGN TEXT + appWD.Selection.Tables(1).Rows.Alignment = wdAlignParagraphLeft + appWD.Selection.Tables(1).Rows.Alignment = wdAlignRowCenter + + 'REMOVE TABLE INDENTS + appWD.Selection.Tables(1).Rows.LeftIndent = Application.InchesToPoints(0) + + 'SHADE SELECTION + appWD.Selection.Shading.BackgroundPatternColor = -570392321 + + 'CLEAR BORDERS IN TABLE + WRD_ClearBorders + + 'ADD BORDER BACK IN TABLE + appWD.Selection.Borders(wdBorderBottom).Visible = True + + '/----------------------------------\ + '| | + '| CHARTS AND FIGURE EDITS | + '| | + '\----------------------------------/ + + 'COPY ONE CHART FROM EXCEL TO WORD + Set ChartPaste = ExcelWB.Sheets("Graphs").ChartObjects("Math") + ChartPaste.ChartArea.AutoScaleFont = False 'DON'T RESIZE TEXT AUTOMATICALLY + ChartPaste.Copy + appWD.Selection.Paste + appWD.Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter 'CENTER CHART + + ' COPY MULTIPLE CHARTS FROM EXCEL TO WORD + For Each ChartID In ActiveSheet.ChartObjects + ChartID.ChartArea.AutoScaleFont = False 'stop resizing of text in chart + ChartID.Copy 'copy chart + appWD.Selection.Paste 'paste into MS Word + appWD.Selection.EndKey unit:=wdStory + WRD_NextLine + Next + + '/----------------------------------------\ + '| | + '| PASTE CHART FROM EXCEL, EDIT IN WORD | + '| | + '\----------------------------------------/ + +End Sub \ No newline at end of file diff --git a/samples/Visual Basic 6.0/modFrm.bas b/samples/Visual Basic 6.0/modFrm.bas new file mode 100644 index 0000000000..7c9f19da36 --- /dev/null +++ b/samples/Visual Basic 6.0/modFrm.bas @@ -0,0 +1,40 @@ +Attribute VB_Name = "modFrm" + +Option Explicit +Option Compare Binary +Option Base 0 + +'form move +Public Declare Function SendMessage Lib "User32" Alias "SendMessageA" (ByVal hWND As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long +Public Declare Function ReleaseCapture Lib "User32" () As Long + +'keep on top +Private Declare Function SetWindowPos Lib "User32" (ByVal hWND As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long +Private Const HWND_TOPMOST = -1 +Private Const HWND_NOTOPMOST = -2 +Private Const SWP_NOACTIVATE = &H10 +Private Const SWP_NOMOVE = &H2 +Private Const SWP_NOSIZE = &H1 + +'windows +Public Declare Function IsIconic Lib "User32" (ByVal hWND As Long) As Long +Public Declare Function ShowWindow Lib "User32" (ByVal hWND As Long, ByVal nCmdShow As Long) As Long +Public Const SW_MINIMIZE = 6 +Public Const SW_SHOWDEFAULT = 10 +Public Const SW_SHOWMAXIMIZED = 3 +Public Const SW_SHOWMINIMIZED = 2 +Public Const SW_SHOWMINNOACTIVE = 7 +Public Const SW_SHOWNA = 8 +Public Const SW_SHOWNOACTIVATE = 4 +Public Const SW_SHOWNORMAL = 1 +Public Const SW_SHOW = 5 +Public Const SW_RESTORE = 9 + +Public Sub KeepOnTop(Frm As Form, State As Boolean) +Select Case State + Case True + SetWindowPos Frm.hWND, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_NOSIZE Or SWP_NOMOVE + Case False + SetWindowPos Frm.hWND, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_NOSIZE Or SWP_NOMOVE +End Select +End Sub From 9150b62a4286f2fff8c4c7395830dc769a687b1a Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Mon, 25 Nov 2024 10:47:20 -0500 Subject: [PATCH 11/22] Detect ts-proto generated files. (#7082) ts-proto [added generated code comments in May](https://github.com/stephenh/ts-proto/pull/1037). This updates linguist to properly detect them. --- lib/linguist/generated.rb | 23 ++++++++ samples/TypeScript/proto.ts | 113 ++++++++++++++++++++++++++++++++++++ test/test_blob.rb | 1 + 3 files changed, 137 insertions(+) create mode 100644 samples/TypeScript/proto.ts diff --git a/lib/linguist/generated.rb b/lib/linguist/generated.rb index 539fc7029e..f3ecf58ba2 100644 --- a/lib/linguist/generated.rb +++ b/lib/linguist/generated.rb @@ -91,6 +91,7 @@ def generated? generated_protocol_buffer_from_go? || generated_protocol_buffer? || generated_javascript_protocol_buffer? || + generated_typescript_protocol_buffer? || generated_apache_thrift? || generated_jni_header? || vcr_cassette? || @@ -367,6 +368,28 @@ def generated_javascript_protocol_buffer? return lines[5].include?("GENERATED CODE -- DO NOT EDIT!") end + # Internal: Is the blob a TypeScript source file generated by the + # Protocol Buffer compiler? + # + # Files generated by ts-proto typically start with something like this + # (though the versions lines are optional): + # + # // Code generated by protoc-gen-ts_proto. DO NOT EDIT. + # // versions: + # // protoc-gen-ts_proto v1.181.2 + # // protoc v5.28.2 + # // source: hello.proto + # + # /* eslint-disable */ + # + # Returns true or false. + def generated_typescript_protocol_buffer? + return false unless extname == ".ts" + return false unless lines.count > 4 + + return lines[0].include?("Code generated by protoc-gen-ts_proto. DO NOT EDIT.") + end + APACHE_THRIFT_EXTENSIONS = ['.rb', '.py', '.go', '.js', '.m', '.java', '.h', '.cc', '.cpp', '.php'] # Internal: Is the blob generated by Apache Thrift compiler? diff --git a/samples/TypeScript/proto.ts b/samples/TypeScript/proto.ts new file mode 100644 index 0000000000..3396bcc746 --- /dev/null +++ b/samples/TypeScript/proto.ts @@ -0,0 +1,113 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.181.2 +// protoc v5.28.2 +// source: hello.proto + +/* eslint-disable */ +import _m0 from "protobufjs/minimal"; +import { Any } from "./google/protobuf/any"; + +export const protobufPackage = "helloworld"; + +export interface HelloWorld { + payload: Any | undefined; +} + +function createBaseHelloWorld(): HelloWorld { + return { payload: undefined }; +} + +export const HelloWorld = { + encode( + message: HelloWorld, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { + if (message.payload !== undefined) { + Any.encode(message.payload, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): HelloWorld { + const reader = + input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseHelloWorld(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.payload = Any.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): HelloWorld { + return { + payload: isSet(object.payload) ? Any.fromJSON(object.payload) : undefined, + }; + }, + + toJSON(message: HelloWorld): unknown { + const obj: any = {}; + if (message.payload !== undefined) { + obj.payload = Any.toJSON(message.payload); + } + return obj; + }, + + create, I>>(base?: I): HelloWorld { + return HelloWorld.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I + ): HelloWorld { + const message = createBaseHelloWorld(); + message.payload = + object.payload !== undefined && object.payload !== null + ? Any.fromPartial(object.payload) + : undefined; + return message; + }, +}; + +type Builtin = + | Date + | Function + | Uint8Array + | string + | number + | boolean + | undefined; + +export type DeepPartial = T extends Builtin + ? T + : T extends globalThis.Array + ? globalThis.Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin + ? P + : P & { [K in keyof P]: Exact } & { + [K in Exclude>]: never; + }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/test/test_blob.rb b/test/test_blob.rb index fc69a86283..767c023f26 100644 --- a/test/test_blob.rb +++ b/test/test_blob.rb @@ -202,6 +202,7 @@ def test_generated assert sample_blob_memory("Go/embedded.go").generated? assert sample_blob_memory("Go/oapi-codegen.go").generated? assert sample_blob_memory("JavaScript/proto.js").generated? + assert sample_blob_memory("TypeScript/proto.ts").generated? assert sample_blob_memory("PHP/ProtobufGenerated.php").generated? # Apache Thrift generated code From 8dac458caee33d41a7e3d67476876c92bcb715d0 Mon Sep 17 00:00:00 2001 From: Yuichi Yogo Date: Tue, 26 Nov 2024 00:47:48 +0900 Subject: [PATCH 12/22] Replace Vue Grammar (#7086) * Replace Vue Grammar * Add the new Vue.js grammar vendor in README * Update Vue language definition to use correct tm_scope --- .gitmodules | 6 +++--- grammars.yml | 9 +++++++-- lib/linguist/languages.yml | 2 +- vendor/README.md | 2 +- vendor/grammars/language-tools | 1 + vendor/grammars/vue-syntax-highlight | 1 - ...ghlight.dep.yml => language-tools.dep.yml} | 20 +++++++++---------- 7 files changed, 22 insertions(+), 19 deletions(-) create mode 160000 vendor/grammars/language-tools delete mode 160000 vendor/grammars/vue-syntax-highlight rename vendor/licenses/git_submodule/{vue-syntax-highlight.dep.yml => language-tools.dep.yml} (74%) diff --git a/.gitmodules b/.gitmodules index cdf1bdedb1..86b1b3b447 100644 --- a/.gitmodules +++ b/.gitmodules @@ -830,6 +830,9 @@ [submodule "vendor/grammars/language-toc-wow"] path = vendor/grammars/language-toc-wow url = https://github.com/nebularg/language-toc-wow +[submodule "vendor/grammars/language-tools"] + path = vendor/grammars/language-tools + url = https://github.com/vuejs/language-tools.git [submodule "vendor/grammars/language-tsql"] path = vendor/grammars/language-tsql url = https://github.com/beau-witter/language-tsql @@ -1410,9 +1413,6 @@ [submodule "vendor/grammars/vscode_mikrotik_routeros_script"] path = vendor/grammars/vscode_mikrotik_routeros_script url = https://github.com/devMikeUA/vscode_mikrotik_routeros_script.git -[submodule "vendor/grammars/vue-syntax-highlight"] - path = vendor/grammars/vue-syntax-highlight - url = https://github.com/vuejs/vue-syntax-highlight [submodule "vendor/grammars/wgsl-analyzer"] path = vendor/grammars/wgsl-analyzer url = https://github.com/wgsl-analyzer/wgsl-analyzer.git diff --git a/grammars.yml b/grammars.yml index 1e3743a9b3..120a674f51 100644 --- a/grammars.yml +++ b/grammars.yml @@ -790,6 +790,13 @@ vendor/grammars/language-ti-basic: - source.8xp vendor/grammars/language-toc-wow: - source.toc +vendor/grammars/language-tools: +- markdown.vue.codeblock +- mdx.vue.codeblock +- source.vue +- vue.directives +- vue.interpolations +- vue.sfc.style.variable.injection vendor/grammars/language-tsql: - source.tsql vendor/grammars/language-turing: @@ -1281,8 +1288,6 @@ vendor/grammars/vscode_cobol: - source.utreport vendor/grammars/vscode_mikrotik_routeros_script: - source.rsc -vendor/grammars/vue-syntax-highlight: -- text.html.vue vendor/grammars/wgsl-analyzer: - source.wgsl vendor/grammars/witcherscript-grammar: diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index d2941c9df6..02987281b8 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -7782,7 +7782,7 @@ Vue: color: "#41b883" extensions: - ".vue" - tm_scope: text.html.vue + tm_scope: source.vue ace_mode: html language_id: 391 Vyper: diff --git a/vendor/README.md b/vendor/README.md index a809bc07c7..1d8f2e1a43 100644 --- a/vendor/README.md +++ b/vendor/README.md @@ -613,7 +613,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting - **Visual Basic .NET:** [peters-ben-0007/VBDotNetSyntax](https://github.com/peters-ben-0007/VBDotNetSyntax) - **Visual Basic 6.0:** [serkonda7/vscode-vba](https://github.com/serkonda7/vscode-vba) - **Volt:** [textmate/d.tmbundle](https://github.com/textmate/d.tmbundle) -- **Vue:** [vuejs/vue-syntax-highlight](https://github.com/vuejs/vue-syntax-highlight) +- **Vue:** [vuejs/language-tools](https://github.com/vuejs/language-tools) - **Vyper:** [davidhq/SublimeEthereum](https://github.com/davidhq/SublimeEthereum) - **WDL:** [stjude-rust-labs/sprocket-vscode](https://github.com/stjude-rust-labs/sprocket-vscode) - **WGSL:** [wgsl-analyzer/wgsl-analyzer](https://github.com/wgsl-analyzer/wgsl-analyzer) diff --git a/vendor/grammars/language-tools b/vendor/grammars/language-tools new file mode 160000 index 0000000000..6916e42fb7 --- /dev/null +++ b/vendor/grammars/language-tools @@ -0,0 +1 @@ +Subproject commit 6916e42fb7109d9510e181de24f1a0f3d56da63b diff --git a/vendor/grammars/vue-syntax-highlight b/vendor/grammars/vue-syntax-highlight deleted file mode 160000 index 2a3e89e415..0000000000 --- a/vendor/grammars/vue-syntax-highlight +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2a3e89e415f49f5fbe8bf8bf42e45f8f78ccf642 diff --git a/vendor/licenses/git_submodule/vue-syntax-highlight.dep.yml b/vendor/licenses/git_submodule/language-tools.dep.yml similarity index 74% rename from vendor/licenses/git_submodule/vue-syntax-highlight.dep.yml rename to vendor/licenses/git_submodule/language-tools.dep.yml index 15583646e8..a680621dbd 100644 --- a/vendor/licenses/git_submodule/vue-syntax-highlight.dep.yml +++ b/vendor/licenses/git_submodule/language-tools.dep.yml @@ -1,15 +1,15 @@ --- -name: vue-syntax-highlight -version: 2a3e89e415f49f5fbe8bf8bf42e45f8f78ccf642 +name: language-tools +version: 6916e42fb7109d9510e181de24f1a0f3d56da63b type: git_submodule -homepage: https://github.com/vuejs/vue-syntax-highlight +homepage: https://github.com/vuejs/language-tools.git license: mit licenses: - sources: LICENSE text: | - The MIT License (MIT) + MIT License - Copyright (c) 2013-2016 Evan You + Copyright (c) 2021-present Johnson Chu Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -18,16 +18,14 @@ licenses: copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -- sources: README.md - text: "[MIT](http://opensource.org/licenses/MIT)" + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. notices: [] From 065a20531aadc9e76ffd1848b79ec3a7990a9520 Mon Sep 17 00:00:00 2001 From: Haoxiang Fei Date: Mon, 25 Nov 2024 23:47:59 +0800 Subject: [PATCH 13/22] Add MoonBit (#7097) * Add MoonBit to languages.yml * Run script/add-grammar * Add samples * Run script/update-ids * Fix tm_scope * Run script/list-grammars * update grammar --- .gitmodules | 3 + grammars.yml | 2 + lib/linguist/languages.yml | 8 + samples/MoonBit/cfold.mbt | 96 ++++++++ samples/MoonBit/deriv.mbt | 115 ++++++++++ samples/MoonBit/fft.mbt | 102 +++++++++ samples/MoonBit/nqueens.mbt | 57 +++++ samples/MoonBit/rbtree.mbt | 118 ++++++++++ vendor/README.md | 1 + vendor/grammars/moonbit-tmLanguage | 1 + .../git_submodule/moonbit-tmLanguage.dep.yml | 212 ++++++++++++++++++ 11 files changed, 715 insertions(+) create mode 100644 samples/MoonBit/cfold.mbt create mode 100644 samples/MoonBit/deriv.mbt create mode 100644 samples/MoonBit/fft.mbt create mode 100644 samples/MoonBit/nqueens.mbt create mode 100644 samples/MoonBit/rbtree.mbt create mode 160000 vendor/grammars/moonbit-tmLanguage create mode 100644 vendor/licenses/git_submodule/moonbit-tmLanguage.dep.yml diff --git a/.gitmodules b/.gitmodules index 86b1b3b447..516ec094ff 100644 --- a/.gitmodules +++ b/.gitmodules @@ -926,6 +926,9 @@ [submodule "vendor/grammars/monkey"] path = vendor/grammars/monkey url = https://github.com/gingerbeardman/monkey.tmbundle +[submodule "vendor/grammars/moonbit-tmLanguage"] + path = vendor/grammars/moonbit-tmLanguage + url = https://github.com/moonbitlang/moonbit-tmLanguage.git [submodule "vendor/grammars/moonscript-tmbundle"] path = vendor/grammars/moonscript-tmbundle url = https://github.com/leafo/moonscript-tmbundle diff --git a/grammars.yml b/grammars.yml index 120a674f51..3b9da322f6 100644 --- a/grammars.yml +++ b/grammars.yml @@ -869,6 +869,8 @@ vendor/grammars/mojo-syntax: - source.mojo vendor/grammars/monkey: - source.monkey +vendor/grammars/moonbit-tmLanguage: +- source.moonbit vendor/grammars/moonscript-tmbundle: - source.moonscript vendor/grammars/nemerle.tmbundle: diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 02987281b8..c01e83ab2a 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -4491,6 +4491,14 @@ Moocode: tm_scope: none ace_mode: text language_id: 237 +MoonBit: + type: programming + color: "#b92381" + extensions: + - ".mbt" + tm_scope: source.moonbit + ace_mode: text + language_id: 181453007 MoonScript: type: programming color: "#ff4585" diff --git a/samples/MoonBit/cfold.mbt b/samples/MoonBit/cfold.mbt new file mode 100644 index 0000000000..1f84a54b20 --- /dev/null +++ b/samples/MoonBit/cfold.mbt @@ -0,0 +1,96 @@ +// Copyright 2024 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Origin: https://github.com/moonbit-community/moonbit-native-benchmark2 + +enum Expr { + Var(Int) + Val(Int) + Add(Expr, Expr) + Mul(Expr, Expr) +} + +fn dec(n : Int) -> Int { + if n == 0 { 0 } else { n - 1 } +} + +fn mk_expr(n : Int, v : Int) -> Expr { + if n == 0 { + if v == 0 { + Var(1) + } else { + Val(v) + } + } else { + Add(mk_expr(n - 1, v + 1), mk_expr(n - 1, dec(v))) + } +} + +fn Expr::append_add(e0 : Expr, e3 : Expr) -> Expr { + match e0 { + Add(e1, e2) => Add(e1, e2.append_add(e3)) + _ => Add(e0, e3) + } +} + +fn Expr::append_mul(e0 : Expr, e3 : Expr) -> Expr { + match e0 { + Mul(e1, e2) => Mul(e1, e2.append_mul(e3)) + _ => Mul(e0, e3) + } +} + +fn Expr::reassoc(e : Expr) -> Expr { + match e { + Add(e1, e2) => e1.reassoc().append_add(e2.reassoc()) + Mul(e1, e2) => e1.reassoc().append_mul(e2.reassoc()) + e => e + } +} + +fn Expr::const_folding(e : Expr) -> Expr { + match e { + Add(e1, e2) => + match (e1.const_folding(), e2.const_folding()) { + (Val(a), Val(b)) => Val(a + b) + (Val(a), Add(e, Val(b))) => Add(Val(a + b), e) + (Val(a), Add(Val(b), e)) => Add(Val(a + b), e) + (e1, e2) => Add(e1, e2) + } + Mul(e1, e2) => + match (e1.const_folding(), e2.const_folding()) { + (Val(a), Val(b)) => Val(a * b) + (Val(a), Mul(e, Val(b))) => Mul(Val(a * b), e) + (Val(a), Mul(Val(b), e)) => Mul(Val(a * b), e) + (e1, e2) => Mul(e1, e2) + } + e => e + } +} + +fn eval(self : Expr) -> Int { + match self { + Val(n) => n + Var(_) => 0 + Add(e1, e2) => e1.eval() + e2.eval() + Mul(e1, e2) => e1.eval() * e2.eval() + } +} + +fn main { + let e = mk_expr(20, 1) + let v1 = e.eval() + let v2 = e.reassoc().const_folding().eval() + println("\{v1} \{v2}") +} diff --git a/samples/MoonBit/deriv.mbt b/samples/MoonBit/deriv.mbt new file mode 100644 index 0000000000..19eb3918f4 --- /dev/null +++ b/samples/MoonBit/deriv.mbt @@ -0,0 +1,115 @@ +// Copyright 2024 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Origin: https://github.com/moonbit-community/moonbit-native-benchmark2 + +enum Expr { + Val(Int) + Var(String) + Add(Expr, Expr) + Mul(Expr, Expr) + Pow(Expr, Expr) + Ln(Expr) +} + +fn pown(a : Int, n : Int) -> Int { + match n { + 0 => 1 + 1 => a + n => { + let b = pown(a, n >> 2) + b * b * (if (n & 1) == 0 { 1 } else { a }) + } + } +} + +fn Expr::op_add(e1 : Expr, e2 : Expr) -> Expr { + match (e1, e2) { + (Val(n), Val(m)) => Val(n + m) + (Val(0), f) | (f, Val(0)) => f + (f, Val(n)) => Val(n) + f + (Val(n), Add(Val(m), f)) => Val(n + m) + f + (f, Add(Val(n), g)) => Val(n) + (f + g) + (Add(f, g), h) => f + (g + h) + (f, g) => Add(f, g) + } +} + +fn Expr::op_mul(e1 : Expr, e2 : Expr) -> Expr { + match (e1, e2) { + (Val(n), Val(m)) => Val(n * m) + (Val(0), _) | (_, Val(0)) => Val(0) + (Val(1), f) | (f, Val(1)) => f + (f, Val(n)) => Val(n) * f + (Val(n), Mul(Val(m), f)) => Val(n * m) * f + (f, Mul(Val(n), g)) => Val(n) * (f * g) + (Mul(f, g), h) => f * (g * h) + (f, g) => Mul(f, g) + } +} + +fn pow(self : Expr, e2 : Expr) -> Expr { + match (self, e2) { + (Val(m), Val(n)) => Val(pown(m, n)) + (_, Val(0)) => Val(1) + (f, Val(1)) => f + (Val(0), _) => Val(0) + (f, g) => Pow(f, g) + } +} + +fn ln(e : Expr) -> Expr { + match e { + Val(1) => Val(0) + f => Ln(f) + } +} + +fn Expr::d(f : Expr, x : String) -> Expr { + match f { + Val(_) => Val(0) + Var(y) => if x == y { Val(1) } else { Val(0) } + Add(f, g) => f.d(x) + g.d(x) + Mul(f, g) => f * g.d(x) + g * f.d(x) + Pow(f, g) => f.pow(g) * (g * f.d(x) * f.pow(Val(-1)) + ln(f) * g.d(x)) + Ln(f) => f.d(x) * f.pow(Val(-1)) + } +} + +fn count(self : Expr) -> Int { + match self { + Val(_) | Var(_) => 1 + Add(f, g) | Mul(f, g) | Pow(f, g) => f.count() + g.count() + Ln(f) => f.count() + } +} + +fn nest(f : (Int, Expr) -> Expr, n : Int, x : Expr) -> Expr { + loop n, x { + 0, x => x + i, x => continue i - 1, f(n - i, x) + } +} + +fn deriv(i : Int, f : Expr) -> Expr { + let d = f.d("x") + println("\{i + 1} count: \{d.count()}") + d +} + +fn main { + let x = Var("x") + let f = pow(x, x) + let _ = nest(deriv, 10, f) +} diff --git a/samples/MoonBit/fft.mbt b/samples/MoonBit/fft.mbt new file mode 100644 index 0000000000..1d138964d3 --- /dev/null +++ b/samples/MoonBit/fft.mbt @@ -0,0 +1,102 @@ +// Copyright 2024 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Origin: https://github.com/moonbit-community/moonbit-native-benchmark1/tree/master + +pub struct Complex { + real : Double + imag : Double +} + +pub fn Complex::add(self : Complex, other : Complex) -> Complex { + { real: self.real + other.real, imag: self.imag + other.imag } +} + +pub fn Complex::sub(self : Complex, other : Complex) -> Complex { + { real: self.real - other.real, imag: self.imag - other.imag } +} + +pub fn Complex::mul(self : Complex, other : Complex) -> Complex { + { + real: self.real * other.real - self.imag * other.imag, + imag: self.real * other.imag + self.imag * other.real, + } +} + +pub fn Complex::mul_scalar(self : Complex, scalar : Double) -> Complex { + { real: self.real * scalar, imag: self.imag * scalar } +} + +/// The function implementing the Cooley–Tukey algorithm for Fast Fourier Transform (FFT), as +/// described in . +/// +/// The input signal is modified in-place. +pub fn fft(arr : Array[Complex]) -> Unit { + fn _fft(arr : Array[Complex]) { + let n = arr.length() + if n == 1 { + return + } + let a0 = Array::new(capacity=n / 2) + let a1 = Array::new(capacity=n / 2) + for i in 0..<(n / 2) { + a0.push(arr[2 * i]) + a1.push(arr[2 * i + 1]) + } + _fft(a0) + _fft(a1) + let ang = -2.0 * @math.pi / Double::from_int(n) + let mut w = { real: 1.0, imag: 0.0 } + let wn = { real: @math.cos(ang), imag: @math.sin(ang) } + for i in 0..<(n / 2) { + let p = a0[i] + let q = w.mul(a1[i]) + arr[i] = p.add(q) + arr[i + n / 2] = p.sub(q) + w = w.mul(wn) + } + } + + _fft(arr) + let factor = 1.0 / Double::from_int(arr.length()).sqrt() + for i in 0.. Double { + // precision = 2 + (n * 100.0).round() / 100.0 +} + +fn generate_inputs(len : Int) -> Array[Complex] { + let res : Array[Complex] = [] + for i in 0.. Bool { + match xs { + Nil => true + Cons(q, qs) => queen != q && queen != q + diag && queen != q - diag && safe(queen, diag + 1, qs) + } +} + +fn append_safe(queen : Int, xs : List[Int], xss : List[List[Int]]) -> List[List[Int]] { + if queen <= 0 { + xss + } else if safe(queen, 1, xs) { + append_safe(queen - 1, xs, Cons(Cons(queen, xs), xss)) + } else { + append_safe(queen - 1, xs, xss) + } +} + +fn extend(queen : Int, acc : List[List[Int]], xss : List[List[Int]]) -> List[List[Int]] { + match xss { + Nil => acc + Cons(xs, rest) => extend(queen, append_safe(queen, xs, acc), rest) + } +} + +fn find_solutions(n : Int, queen : Int) -> List[List[Int]] { + if queen == 0 { + Cons(Nil, Nil) + } else { + extend(n, Nil, find_solutions(n, queen - 1)) + } +} + +fn queens(n : Int) -> Int { + find_solutions(n, n).length() +} + +fn main { + println(queens(13)) +} diff --git a/samples/MoonBit/rbtree.mbt b/samples/MoonBit/rbtree.mbt new file mode 100644 index 0000000000..f137d91185 --- /dev/null +++ b/samples/MoonBit/rbtree.mbt @@ -0,0 +1,118 @@ +// Copyright 2024 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Origin: https://github.com/moonbit-community/moonbit-native-benchmark2 + +enum Color { + Red + Black +} + +enum Node { + Leaf + Node(Color, Node, Int, Bool, Node) +} + +fn balance1(kv : Int, vv : Bool, t : Node, n : Node) -> Node { + match n { + Node(_, Node(Red, l, kx, vx, r1), ky, vy, r2) => Node(Red, Node(Black, l, kx, vx, r1), ky, vy, Node(Black, r2, kv, vv, t)) + Node(_, l1, ky, vy, Node(Red, l2, kx, vx, r)) => Node(Red, Node(Black, l1, ky, vy, l2), kx, vx, Node(Black, r, kv, vv, t)) + Node(_, l, ky, vy, r) => Node(Black, Node(Red, l, ky, vy, r), kv, vv, t) + _ => Leaf + } +} + +fn balance2(t : Node, kv : Int, vv : Bool, n : Node) -> Node { + match n { + Node(_, Node(Red, l, kx1, vx1, r1), ky, vy, r2) => Node(Red, Node(Black, t, kv, vv, l), kx1, vx1, Node(Black, r1, ky, vy, r2)) + Node(_, l1, ky, vy, Node(Red, l2, kx2, vx2, r2)) => Node(Red, Node(Black, t, kv, vv, l1), ky, vy, Node(Black, l2, kx2, vx2, r2)) + Node(_, l, ky, vy, r) => Node(Black, t, kv, vv, Node(Red, l, ky, vy, r)) + _ => Leaf + } +} + +fn is_red(self : Node) -> Bool { + match self { + Node(Red, _, _, _, _) => true + _ => false + } +} + +fn ins(self : Node, kx : Int, vx : Bool) -> Node { + match self { + Leaf => Node(Red, Leaf, kx, vx, Leaf) + Node(Red, a, ky, vy, b) => + if kx < ky { + Node(Red, a.ins(kx, vx), ky, vy, b) + } else if ky == kx { + Node(Red, a, kx, vx, b) + } else { + Node(Red, a, ky, vy, b.ins(kx, vx)) + } + Node(Black, a, ky, vy, b) => + if kx < ky { + if a.is_red() { + balance1(ky, vy, b, a.ins(kx, vx)) + } else { + Node(Black, a.ins(kx, vx), ky, vy, b) + } + } else if kx == ky { + Node(Black, a, kx, vx, b) + } else { + if b.is_red() { + balance2(a, ky, vy, b.ins(kx, vx)) + } else { + Node(Black, a, ky, vy, b.ins(kx, vx)) + } + } + } +} + +fn set_black(self : Node) -> Node { + match self { + Node(_, l, k, v, r) => Node(Black, l, k, v, r) + e => e + } +} + +fn insert(self : Node, k : Int, v : Bool) -> Node { + if self.is_red() { + self.ins(k, v).set_black() + } else { + self.ins(k, v) + } +} + +fn fold[X](self : Node, f : (Int, Bool, X) -> X, d : X) -> X { + match self { + Leaf => d + Node(_, l, k, v, r) => r.fold(f, f(k, v, l.fold(f, d))) + } +} + +fn mk_map(n : Int) -> Node { + loop n, Leaf { + 0, m => m + n, m => { + let n1 = n - 1 + continue n1, m.insert(n1, n1 % 10 == 0) + } + } +} + +fn main { + let m = mk_map(4200000) + let v = m.fold(fn { _, v, r => if v { r + 1 } else { r } }, 0) + println(v) +} diff --git a/vendor/README.md b/vendor/README.md index 1d8f2e1a43..7f82f0e3d6 100644 --- a/vendor/README.md +++ b/vendor/README.md @@ -363,6 +363,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting - **Mojo:** [modularml/mojo-syntax](https://github.com/modularml/mojo-syntax) - **Monkey:** [gingerbeardman/monkey.tmbundle](https://github.com/gingerbeardman/monkey.tmbundle) - **Monkey C:** [ghisguth/vscode-monkey-c](https://github.com/ghisguth/vscode-monkey-c) +- **MoonBit:** [moonbitlang/moonbit-tmLanguage](https://github.com/moonbitlang/moonbit-tmLanguage) - **MoonScript:** [leafo/moonscript-tmbundle](https://github.com/leafo/moonscript-tmbundle) - **Motoko:** [dfinity/vscode-motoko](https://github.com/dfinity/vscode-motoko) - **Motorola 68K Assembly:** [zerkman/language-m68k](https://github.com/zerkman/language-m68k) diff --git a/vendor/grammars/moonbit-tmLanguage b/vendor/grammars/moonbit-tmLanguage new file mode 160000 index 0000000000..90896fe5c4 --- /dev/null +++ b/vendor/grammars/moonbit-tmLanguage @@ -0,0 +1 @@ +Subproject commit 90896fe5c4fad686ffb434ba3f03538035d3c5a4 diff --git a/vendor/licenses/git_submodule/moonbit-tmLanguage.dep.yml b/vendor/licenses/git_submodule/moonbit-tmLanguage.dep.yml new file mode 100644 index 0000000000..e9602a9e36 --- /dev/null +++ b/vendor/licenses/git_submodule/moonbit-tmLanguage.dep.yml @@ -0,0 +1,212 @@ +--- +name: moonbit-tmLanguage +version: 90896fe5c4fad686ffb434ba3f03538035d3c5a4 +type: git_submodule +homepage: https://github.com/moonbitlang/moonbit-tmLanguage.git +license: apache-2.0 +licenses: +- sources: LICENSE + text: |2 + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +notices: [] From 1b01393872c922298cbf6ebe9b223baa55edbf2a Mon Sep 17 00:00:00 2001 From: Nikita Fedkin Date: Mon, 25 Nov 2024 16:48:36 +0100 Subject: [PATCH 14/22] Replace 1C Enterprise grammar (#7096) Replase bsl grammar source --- .gitmodules | 6 +++--- grammars.yml | 6 +++--- vendor/README.md | 2 +- vendor/grammars/atom-language-1c-bsl | 1 - vendor/grammars/vsc-language-1c-bsl | 1 + ...-language-1c-bsl.dep.yml => vsc-language-1c-bsl.dep.yml} | 6 +++--- 6 files changed, 11 insertions(+), 11 deletions(-) delete mode 160000 vendor/grammars/atom-language-1c-bsl create mode 160000 vendor/grammars/vsc-language-1c-bsl rename vendor/licenses/git_submodule/{atom-language-1c-bsl.dep.yml => vsc-language-1c-bsl.dep.yml} (89%) diff --git a/.gitmodules b/.gitmodules index 516ec094ff..d6cc3c9f78 100644 --- a/.gitmodules +++ b/.gitmodules @@ -293,9 +293,6 @@ [submodule "vendor/grammars/atom-fstar"] path = vendor/grammars/atom-fstar url = https://github.com/FStarLang/atom-fstar -[submodule "vendor/grammars/atom-language-1c-bsl"] - path = vendor/grammars/atom-language-1c-bsl - url = https://github.com/xDrivenDevelopment/atom-language-1c-bsl.git [submodule "vendor/grammars/atom-language-clean"] path = vendor/grammars/atom-language-clean url = https://github.com/timjs/atom-language-clean.git @@ -1262,6 +1259,9 @@ [submodule "vendor/grammars/vsc-fennel"] path = vendor/grammars/vsc-fennel url = https://github.com/kongeor/vsc-fennel +[submodule "vendor/grammars/vsc-language-1c-bsl"] + path = vendor/grammars/vsc-language-1c-bsl + url = https://github.com/1c-syntax/vsc-language-1c-bsl.git [submodule "vendor/grammars/vscode-TalonScript"] path = vendor/grammars/vscode-TalonScript url = https://github.com/mrob95/vscode-TalonScript.git diff --git a/grammars.yml b/grammars.yml index 3b9da322f6..26858883ef 100644 --- a/grammars.yml +++ b/grammars.yml @@ -241,9 +241,6 @@ vendor/grammars/atom-firestore-grammar: - source.firestore vendor/grammars/atom-fstar: - source.fstar -vendor/grammars/atom-language-1c-bsl: -- source.bsl -- source.sdbl vendor/grammars/atom-language-clean: - source.clean - text.restructuredtext.clean @@ -1130,6 +1127,9 @@ vendor/grammars/vsc-ember-syntax: - text.html.ember-handlebars vendor/grammars/vsc-fennel: - source.fnl +vendor/grammars/vsc-language-1c-bsl: +- source.bsl +- source.sdbl vendor/grammars/vscode-TalonScript: - markdown.talon.codeblock - source.talon diff --git a/vendor/README.md b/vendor/README.md index 7f82f0e3d6..ae93beb16e 100644 --- a/vendor/README.md +++ b/vendor/README.md @@ -6,7 +6,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting **Note:** grammars marked with 🐌 are not updated when Linguist is so upstream fixes may take longer to appear on GitHub. -- **1C Enterprise:** [xDrivenDevelopment/atom-language-1c-bsl](https://github.com/xDrivenDevelopment/atom-language-1c-bsl) +- **1C Enterprise:** [1c-syntax/vsc-language-1c-bsl](https://github.com/1c-syntax/vsc-language-1c-bsl) - **2-Dimensional Array:** [Alhadis/language-etc](https://github.com/Alhadis/language-etc) - **4D:** [ayoubserti/lang-4d](https://github.com/ayoubserti/lang-4d) - **ABAP:** [pvl/abap.tmbundle](https://github.com/pvl/abap.tmbundle) diff --git a/vendor/grammars/atom-language-1c-bsl b/vendor/grammars/atom-language-1c-bsl deleted file mode 160000 index 289454b537..0000000000 --- a/vendor/grammars/atom-language-1c-bsl +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 289454b53797ddc6fe193486c5a08310c214da7e diff --git a/vendor/grammars/vsc-language-1c-bsl b/vendor/grammars/vsc-language-1c-bsl new file mode 160000 index 0000000000..0204d3f7c9 --- /dev/null +++ b/vendor/grammars/vsc-language-1c-bsl @@ -0,0 +1 @@ +Subproject commit 0204d3f7c9d894bf816503252bd3684677d764b3 diff --git a/vendor/licenses/git_submodule/atom-language-1c-bsl.dep.yml b/vendor/licenses/git_submodule/vsc-language-1c-bsl.dep.yml similarity index 89% rename from vendor/licenses/git_submodule/atom-language-1c-bsl.dep.yml rename to vendor/licenses/git_submodule/vsc-language-1c-bsl.dep.yml index 4b31f8c79b..b9e27fe7e8 100644 --- a/vendor/licenses/git_submodule/atom-language-1c-bsl.dep.yml +++ b/vendor/licenses/git_submodule/vsc-language-1c-bsl.dep.yml @@ -1,8 +1,8 @@ --- -name: atom-language-1c-bsl -version: 289454b53797ddc6fe193486c5a08310c214da7e +name: vsc-language-1c-bsl +version: 0204d3f7c9d894bf816503252bd3684677d764b3 type: git_submodule -homepage: https://github.com/xDrivenDevelopment/atom-language-1c-bsl.git +homepage: https://github.com/1c-syntax/vsc-language-1c-bsl.git license: mit licenses: - sources: LICENSE.md From 6b31ca785d58c2f4a53cc02757b873cf775e0db3 Mon Sep 17 00:00:00 2001 From: Adrian Freund Date: Mon, 25 Nov 2024 16:49:20 +0100 Subject: [PATCH 15/22] Mark pixi lock files as generated (#7111) Pixi is a cross-platform package manager for the conda ecosystem. It uses a lockfile called pixi.lock, which should be counted as generated code. --- lib/linguist/generated.rb | 8 + lib/linguist/languages.yml | 1 + samples/YAML/filenames/pixi.lock | 1443 ++++++++++++++++++++++++++++++ test/test_blob.rb | 3 + 4 files changed, 1455 insertions(+) create mode 100644 samples/YAML/filenames/pixi.lock diff --git a/lib/linguist/generated.rb b/lib/linguist/generated.rb index f3ecf58ba2..0e7b8ff1c2 100644 --- a/lib/linguist/generated.rb +++ b/lib/linguist/generated.rb @@ -70,6 +70,7 @@ def generated? poetry_lock? || pdm_lock? || uv_lock? || + pixi_lock? || esy_lock? || npm_shrinkwrap_or_package_lock? || pnpm_lock? || @@ -454,6 +455,13 @@ def uv_lock? !!name.match(/uv\.lock/) end + # Internal: Is the blob a generated pixi lock file? + # + # Returns true or false. + def pixi_lock? + !!name.match(/pixi\.lock/) + end + # Internal: Is the blob a generated esy lock file? # # Returns true or false. diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index c01e83ab2a..5843de3983 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -8293,6 +8293,7 @@ YAML: - ".gemrc" - CITATION.cff - glide.lock + - pixi.lock - yarn.lock ace_mode: yaml codemirror_mode: yaml diff --git a/samples/YAML/filenames/pixi.lock b/samples/YAML/filenames/pixi.lock new file mode 100644 index 0000000000..8d93228dda --- /dev/null +++ b/samples/YAML/filenames/pixi.lock @@ -0,0 +1,1443 @@ +version: 5 +environments: + default: + channels: + - url: https://conda.anaconda.org/conda-forge/ + packages: + linux-64: + - conda: https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/linux-64/_openmp_mutex-4.5-2_gnu.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/linux-64/bzip2-1.0.8-h4bc722e_7.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/ca-certificates-2024.8.30-hbcca054_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/ld_impl_linux-64-2.43-h712a8e2_2.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libblas-3.9.0-25_linux64_openblas.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libcblas-3.9.0-25_linux64_openblas.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libexpat-2.6.3-h5888daf_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libffi-3.4.2-h7f98852_5.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/linux-64/libgcc-14.2.0-h77fa898_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libgcc-ng-14.2.0-h69a702a_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libgfortran-14.2.0-h69a702a_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libgfortran-ng-14.2.0-h69a702a_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libgfortran5-14.2.0-hd5240d6_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libgomp-14.2.0-h77fa898_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/liblapack-3.9.0-25_linux64_openblas.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libmpdec-4.0.0-h4bc722e_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libopenblas-0.3.28-pthreads_h94d23a6_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libsqlite-3.47.0-hadc24fc_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libstdcxx-14.2.0-hc0a3c3a_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libuuid-2.38.1-h0b41bf4_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libzlib-1.3.1-hb9d3cd8_2.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/ncurses-6.5-he02047a_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/numpy-2.1.2-py313h4bf6692_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/openssl-3.3.2-hb9d3cd8_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/python-3.13.0-h9ebbce0_100_cp313.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/python_abi-3.13-5_cp313.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/readline-8.2-h8228510_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/tk-8.6.13-noxft_h4845f30_101.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/tzdata-2024b-hc8b5060_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/xz-5.2.6-h166bdaf_0.tar.bz2 + osx-64: + - conda: https://conda.anaconda.org/conda-forge/osx-64/bzip2-1.0.8-hfdf4475_7.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/ca-certificates-2024.8.30-h8857fd0_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libblas-3.9.0-25_osx64_openblas.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libcblas-3.9.0-25_osx64_openblas.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libcxx-19.1.2-hf95d169_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libexpat-2.6.3-hac325c4_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libffi-3.4.2-h0d85af4_5.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/osx-64/libgfortran-5.0.0-13_2_0_h97931a8_3.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libgfortran5-13.2.0-h2873a65_3.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/liblapack-3.9.0-25_osx64_openblas.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libmpdec-4.0.0-hfdf4475_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libopenblas-0.3.28-openmp_h8869122_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libsqlite-3.47.0-h2f8c449_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libzlib-1.3.1-hd23fc13_2.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/llvm-openmp-19.1.2-hf78d878_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/ncurses-6.5-hf036a51_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/numpy-2.1.2-py313hd1f2bdd_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/openssl-3.3.2-hd23fc13_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/python-3.13.0-h0608dab_100_cp313.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/python_abi-3.13-5_cp313.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/readline-8.2-h9e318b2_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/tk-8.6.13-h1abcd95_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/tzdata-2024b-hc8b5060_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/xz-5.2.6-h775f41a_0.tar.bz2 + win-64: + - conda: https://conda.anaconda.org/conda-forge/win-64/bzip2-1.0.8-h2466b09_7.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/ca-certificates-2024.8.30-h56e8100_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/intel-openmp-2024.2.1-h57928b3_1083.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/libblas-3.9.0-25_win64_mkl.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/libcblas-3.9.0-25_win64_mkl.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/libexpat-2.6.3-he0c23c2_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/libffi-3.4.2-h8ffe710_5.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/win-64/libhwloc-2.11.1-default_h8125262_1000.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/libiconv-1.17-hcfcfb64_2.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/liblapack-3.9.0-25_win64_mkl.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/libmpdec-4.0.0-h2466b09_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/libsqlite-3.47.0-h2466b09_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/libxml2-2.12.7-h0f24e4e_4.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/libzlib-1.3.1-h2466b09_2.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/mkl-2024.2.2-h66d3029_14.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/numpy-2.1.2-py313hd65a2fa_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/openssl-3.3.2-h2466b09_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/pthreads-win32-2.9.1-h2466b09_4.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/python-3.13.0-hf5aa216_100_cp313.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/python_abi-3.13-5_cp313.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/tbb-2021.13.0-hc790b64_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/tk-8.6.13-h5226925_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/tzdata-2024b-hc8b5060_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/ucrt-10.0.22621.0-h57928b3_1.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/vc-14.3-ha32ba9b_22.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/vc14_runtime-14.40.33810-hcc2c482_22.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/vs2015_runtime-14.40.33810-h3bf8584_22.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/xz-5.2.6-h8d14728_0.tar.bz2 +packages: +- kind: conda + name: _libgcc_mutex + version: '0.1' + build: conda_forge + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2 + sha256: fe51de6107f9edc7aa4f786a70f4a883943bc9d39b3bb7307c04c41410990726 + md5: d7c89558ba9fa0495403155b64376d81 + license: None + size: 2562 + timestamp: 1578324546067 +- kind: conda + name: _openmp_mutex + version: '4.5' + build: 2_gnu + build_number: 16 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/_openmp_mutex-4.5-2_gnu.tar.bz2 + sha256: fbe2c5e56a653bebb982eda4876a9178aedfc2b545f25d0ce9c4c0b508253d22 + md5: 73aaf86a425cc6e73fcf236a5a46396d + depends: + - _libgcc_mutex 0.1 conda_forge + - libgomp >=7.5.0 + constrains: + - openmp_impl 9999 + license: BSD-3-Clause + license_family: BSD + size: 23621 + timestamp: 1650670423406 +- kind: conda + name: bzip2 + version: 1.0.8 + build: h2466b09_7 + build_number: 7 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/bzip2-1.0.8-h2466b09_7.conda + sha256: 35a5dad92e88fdd7fc405e864ec239486f4f31eec229e31686e61a140a8e573b + md5: 276e7ffe9ffe39688abc665ef0f45596 + depends: + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + license: bzip2-1.0.6 + license_family: BSD + size: 54927 + timestamp: 1720974860185 +- kind: conda + name: bzip2 + version: 1.0.8 + build: h4bc722e_7 + build_number: 7 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/bzip2-1.0.8-h4bc722e_7.conda + sha256: 5ced96500d945fb286c9c838e54fa759aa04a7129c59800f0846b4335cee770d + md5: 62ee74e96c5ebb0af99386de58cf9553 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc-ng >=12 + license: bzip2-1.0.6 + license_family: BSD + size: 252783 + timestamp: 1720974456583 +- kind: conda + name: bzip2 + version: 1.0.8 + build: hfdf4475_7 + build_number: 7 + subdir: osx-64 + url: https://conda.anaconda.org/conda-forge/osx-64/bzip2-1.0.8-hfdf4475_7.conda + sha256: cad153608b81fb24fc8c509357daa9ae4e49dfc535b2cb49b91e23dbd68fc3c5 + md5: 7ed4301d437b59045be7e051a0308211 + depends: + - __osx >=10.13 + license: bzip2-1.0.6 + license_family: BSD + size: 134188 + timestamp: 1720974491916 +- kind: conda + name: ca-certificates + version: 2024.8.30 + build: h56e8100_0 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/ca-certificates-2024.8.30-h56e8100_0.conda + sha256: 0fcac3a7ffcc556649e034a1802aedf795e64227eaa7194d207b01eaf26454c4 + md5: 4c4fd67c18619be5aa65dc5b6c72e490 + license: ISC + size: 158773 + timestamp: 1725019107649 +- kind: conda + name: ca-certificates + version: 2024.8.30 + build: h8857fd0_0 + subdir: osx-64 + url: https://conda.anaconda.org/conda-forge/osx-64/ca-certificates-2024.8.30-h8857fd0_0.conda + sha256: 593f302d0f44c2c771e1614ee6d56fffdc7d616e6f187669c8b0e34ffce3e1ae + md5: b7e5424e7f06547a903d28e4651dbb21 + license: ISC + size: 158665 + timestamp: 1725019059295 +- kind: conda + name: ca-certificates + version: 2024.8.30 + build: hbcca054_0 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/ca-certificates-2024.8.30-hbcca054_0.conda + sha256: afee721baa6d988e27fef1832f68d6f32ac8cc99cdf6015732224c2841a09cea + md5: c27d1c142233b5bc9ca570c6e2e0c244 + license: ISC + size: 159003 + timestamp: 1725018903918 +- kind: conda + name: intel-openmp + version: 2024.2.1 + build: h57928b3_1083 + build_number: 1083 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/intel-openmp-2024.2.1-h57928b3_1083.conda + sha256: 0fd2b0b84c854029041b0ede8f4c2369242ee92acc0092f8407b1fe9238a8209 + md5: 2d89243bfb53652c182a7c73182cce4f + license: LicenseRef-IntelSimplifiedSoftwareOct2022 + license_family: Proprietary + size: 1852356 + timestamp: 1723739573141 +- kind: conda + name: ld_impl_linux-64 + version: '2.43' + build: h712a8e2_2 + build_number: 2 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/ld_impl_linux-64-2.43-h712a8e2_2.conda + sha256: 7c91cea91b13f4314d125d1bedb9d03a29ebbd5080ccdea70260363424646dbe + md5: 048b02e3962f066da18efe3a21b77672 + depends: + - __glibc >=2.17,<3.0.a0 + constrains: + - binutils_impl_linux-64 2.43 + license: GPL-3.0-only + license_family: GPL + size: 669211 + timestamp: 1729655358674 +- kind: conda + name: libblas + version: 3.9.0 + build: 25_linux64_openblas + build_number: 25 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/libblas-3.9.0-25_linux64_openblas.conda + sha256: d6d12dc437d060f838820e9e61bf73baab651f91935ac594cf10beb9ef1b4450 + md5: 8ea26d42ca88ec5258802715fe1ee10b + depends: + - libopenblas >=0.3.28,<0.3.29.0a0 + - libopenblas >=0.3.28,<1.0a0 + constrains: + - liblapack 3.9.0 25_linux64_openblas + - libcblas 3.9.0 25_linux64_openblas + - blas * openblas + - liblapacke 3.9.0 25_linux64_openblas + license: BSD-3-Clause + license_family: BSD + size: 15677 + timestamp: 1729642900350 +- kind: conda + name: libblas + version: 3.9.0 + build: 25_osx64_openblas + build_number: 25 + subdir: osx-64 + url: https://conda.anaconda.org/conda-forge/osx-64/libblas-3.9.0-25_osx64_openblas.conda + sha256: 1b22b5322a311a775bca637b26317645cf07e35f125cede9278c6c45db6e7105 + md5: da0a6f87958893e1d2e2bbc7e7a6541f + depends: + - libopenblas >=0.3.28,<0.3.29.0a0 + - libopenblas >=0.3.28,<1.0a0 + constrains: + - liblapack 3.9.0 25_osx64_openblas + - liblapacke 3.9.0 25_osx64_openblas + - blas * openblas + - libcblas 3.9.0 25_osx64_openblas + license: BSD-3-Clause + license_family: BSD + size: 15952 + timestamp: 1729643159199 +- kind: conda + name: libblas + version: 3.9.0 + build: 25_win64_mkl + build_number: 25 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/libblas-3.9.0-25_win64_mkl.conda + sha256: 5468bb91c44b41ce060bbd997c797b2f91e2b7ce91a7cbf4ddf7e7b734a8dc98 + md5: 499208e81242efb6e5abc7366c91c816 + depends: + - mkl 2024.2.2 h66d3029_14 + constrains: + - blas * mkl + - libcblas 3.9.0 25_win64_mkl + - liblapack 3.9.0 25_win64_mkl + - liblapacke 3.9.0 25_win64_mkl + license: BSD-3-Clause + license_family: BSD + size: 3736641 + timestamp: 1729643534444 +- kind: conda + name: libcblas + version: 3.9.0 + build: 25_linux64_openblas + build_number: 25 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/libcblas-3.9.0-25_linux64_openblas.conda + sha256: ab87b0477078837c91d9cda62a9faca18fba7c57cc77aa779ae24b3ac783b5dd + md5: 5dbd1b0fc0d01ec5e0e1fbe667281a11 + depends: + - libblas 3.9.0 25_linux64_openblas + constrains: + - liblapack 3.9.0 25_linux64_openblas + - blas * openblas + - liblapacke 3.9.0 25_linux64_openblas + license: BSD-3-Clause + license_family: BSD + size: 15613 + timestamp: 1729642905619 +- kind: conda + name: libcblas + version: 3.9.0 + build: 25_osx64_openblas + build_number: 25 + subdir: osx-64 + url: https://conda.anaconda.org/conda-forge/osx-64/libcblas-3.9.0-25_osx64_openblas.conda + sha256: b04ae297aa5396df3135514866db72845b111c92524570f923625473f11cfbe2 + md5: ab304b75ea67f850cf7adf9156e3f62f + depends: + - libblas 3.9.0 25_osx64_openblas + constrains: + - liblapack 3.9.0 25_osx64_openblas + - liblapacke 3.9.0 25_osx64_openblas + - blas * openblas + license: BSD-3-Clause + license_family: BSD + size: 15842 + timestamp: 1729643166929 +- kind: conda + name: libcblas + version: 3.9.0 + build: 25_win64_mkl + build_number: 25 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/libcblas-3.9.0-25_win64_mkl.conda + sha256: 21528cdfe67dafdb2d21925515a167f13963e002c2b6d06d68984767f731850c + md5: 3ed189ba03a9888a8013aaee0d67c49d + depends: + - libblas 3.9.0 25_win64_mkl + constrains: + - blas * mkl + - liblapack 3.9.0 25_win64_mkl + - liblapacke 3.9.0 25_win64_mkl + license: BSD-3-Clause + license_family: BSD + size: 3732258 + timestamp: 1729643561581 +- kind: conda + name: libcxx + version: 19.1.2 + build: hf95d169_0 + subdir: osx-64 + url: https://conda.anaconda.org/conda-forge/osx-64/libcxx-19.1.2-hf95d169_0.conda + sha256: 04593566411ce8dc6400777c772c10a153ebf1082b104ee52a98562a24a50880 + md5: 8bdfb741a2cdbd0a4e7b7dc30fbc0d6c + depends: + - __osx >=10.13 + license: Apache-2.0 WITH LLVM-exception + license_family: Apache + size: 526600 + timestamp: 1729038055775 +- kind: conda + name: libexpat + version: 2.6.3 + build: h5888daf_0 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/libexpat-2.6.3-h5888daf_0.conda + sha256: 4bb47bb2cd09898737a5211e2992d63c555d63715a07ba56eae0aff31fb89c22 + md5: 59f4c43bb1b5ef1c71946ff2cbf59524 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + constrains: + - expat 2.6.3.* + license: MIT + license_family: MIT + size: 73616 + timestamp: 1725568742634 +- kind: conda + name: libexpat + version: 2.6.3 + build: hac325c4_0 + subdir: osx-64 + url: https://conda.anaconda.org/conda-forge/osx-64/libexpat-2.6.3-hac325c4_0.conda + sha256: dd22dffad6731c352f4c14603868c9cce4d3b50ff5ff1e50f416a82dcb491947 + md5: c1db99b0a94a2f23bd6ce39e2d314e07 + depends: + - __osx >=10.13 + constrains: + - expat 2.6.3.* + license: MIT + license_family: MIT + size: 70517 + timestamp: 1725568864316 +- kind: conda + name: libexpat + version: 2.6.3 + build: he0c23c2_0 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/libexpat-2.6.3-he0c23c2_0.conda + sha256: 9543965d155b8da96fc67dd81705fe5c2571c7c00becc8de5534c850393d4e3c + md5: 21415fbf4d0de6767a621160b43e5dea + depends: + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + constrains: + - expat 2.6.3.* + license: MIT + license_family: MIT + size: 138992 + timestamp: 1725569106114 +- kind: conda + name: libffi + version: 3.4.2 + build: h0d85af4_5 + build_number: 5 + subdir: osx-64 + url: https://conda.anaconda.org/conda-forge/osx-64/libffi-3.4.2-h0d85af4_5.tar.bz2 + sha256: 7a2d27a936ceee6942ea4d397f9c7d136f12549d86f7617e8b6bad51e01a941f + md5: ccb34fb14960ad8b125962d3d79b31a9 + license: MIT + license_family: MIT + size: 51348 + timestamp: 1636488394370 +- kind: conda + name: libffi + version: 3.4.2 + build: h7f98852_5 + build_number: 5 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/libffi-3.4.2-h7f98852_5.tar.bz2 + sha256: ab6e9856c21709b7b517e940ae7028ae0737546122f83c2aa5d692860c3b149e + md5: d645c6d2ac96843a2bfaccd2d62b3ac3 + depends: + - libgcc-ng >=9.4.0 + license: MIT + license_family: MIT + size: 58292 + timestamp: 1636488182923 +- kind: conda + name: libffi + version: 3.4.2 + build: h8ffe710_5 + build_number: 5 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/libffi-3.4.2-h8ffe710_5.tar.bz2 + sha256: 1951ab740f80660e9bc07d2ed3aefb874d78c107264fd810f24a1a6211d4b1a5 + md5: 2c96d1b6915b408893f9472569dee135 + depends: + - vc >=14.1,<15.0a0 + - vs2015_runtime >=14.16.27012 + license: MIT + license_family: MIT + size: 42063 + timestamp: 1636489106777 +- kind: conda + name: libgcc + version: 14.2.0 + build: h77fa898_1 + build_number: 1 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/libgcc-14.2.0-h77fa898_1.conda + sha256: 53eb8a79365e58849e7b1a068d31f4f9e718dc938d6f2c03e960345739a03569 + md5: 3cb76c3f10d3bc7f1105b2fc9db984df + depends: + - _libgcc_mutex 0.1 conda_forge + - _openmp_mutex >=4.5 + constrains: + - libgomp 14.2.0 h77fa898_1 + - libgcc-ng ==14.2.0=*_1 + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 848745 + timestamp: 1729027721139 +- kind: conda + name: libgcc-ng + version: 14.2.0 + build: h69a702a_1 + build_number: 1 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/libgcc-ng-14.2.0-h69a702a_1.conda + sha256: 3a76969c80e9af8b6e7a55090088bc41da4cffcde9e2c71b17f44d37b7cb87f7 + md5: e39480b9ca41323497b05492a63bc35b + depends: + - libgcc 14.2.0 h77fa898_1 + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 54142 + timestamp: 1729027726517 +- kind: conda + name: libgfortran + version: 5.0.0 + build: 13_2_0_h97931a8_3 + build_number: 3 + subdir: osx-64 + url: https://conda.anaconda.org/conda-forge/osx-64/libgfortran-5.0.0-13_2_0_h97931a8_3.conda + sha256: 4874422e567b68334705c135c17e5acdca1404de8255673ce30ad3510e00be0d + md5: 0b6e23a012ee7a9a5f6b244f5a92c1d5 + depends: + - libgfortran5 13.2.0 h2873a65_3 + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 110106 + timestamp: 1707328956438 +- kind: conda + name: libgfortran + version: 14.2.0 + build: h69a702a_1 + build_number: 1 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/libgfortran-14.2.0-h69a702a_1.conda + sha256: fc9e7f22a17faf74da904ebfc4d88699013d2992e55505e4aa0eb01770290977 + md5: f1fd30127802683586f768875127a987 + depends: + - libgfortran5 14.2.0 hd5240d6_1 + constrains: + - libgfortran-ng ==14.2.0=*_1 + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 53997 + timestamp: 1729027752995 +- kind: conda + name: libgfortran-ng + version: 14.2.0 + build: h69a702a_1 + build_number: 1 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/libgfortran-ng-14.2.0-h69a702a_1.conda + sha256: 423f1e2403f0c665748e42d335e421e53fd03c08d457cfb6f360d329d9459851 + md5: 0a7f4cd238267c88e5d69f7826a407eb + depends: + - libgfortran 14.2.0 h69a702a_1 + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 54106 + timestamp: 1729027945817 +- kind: conda + name: libgfortran5 + version: 13.2.0 + build: h2873a65_3 + build_number: 3 + subdir: osx-64 + url: https://conda.anaconda.org/conda-forge/osx-64/libgfortran5-13.2.0-h2873a65_3.conda + sha256: da3db4b947e30aec7596a3ef92200d17e774cccbbf7efc47802529a4ca5ca31b + md5: e4fb4d23ec2870ff3c40d10afe305aec + depends: + - llvm-openmp >=8.0.0 + constrains: + - libgfortran 5.0.0 13_2_0_*_3 + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 1571379 + timestamp: 1707328880361 +- kind: conda + name: libgfortran5 + version: 14.2.0 + build: hd5240d6_1 + build_number: 1 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/libgfortran5-14.2.0-hd5240d6_1.conda + sha256: d149a37ca73611e425041f33b9d8dbed6e52ec506fe8cc1fc0ee054bddeb6d5d + md5: 9822b874ea29af082e5d36098d25427d + depends: + - libgcc >=14.2.0 + constrains: + - libgfortran 14.2.0 + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 1462645 + timestamp: 1729027735353 +- kind: conda + name: libgomp + version: 14.2.0 + build: h77fa898_1 + build_number: 1 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/libgomp-14.2.0-h77fa898_1.conda + sha256: 1911c29975ec99b6b906904040c855772ccb265a1c79d5d75c8ceec4ed89cd63 + md5: cc3573974587f12dda90d96e3e55a702 + depends: + - _libgcc_mutex 0.1 conda_forge + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 460992 + timestamp: 1729027639220 +- kind: conda + name: libhwloc + version: 2.11.1 + build: default_h8125262_1000 + build_number: 1000 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/libhwloc-2.11.1-default_h8125262_1000.conda + sha256: 92728e292640186759d6dddae3334a1bc0b139740b736ffaeccb825fb8c07a2e + md5: 933bad6e4658157f1aec9b171374fde2 + depends: + - libxml2 >=2.12.7,<3.0a0 + - pthreads-win32 + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + license: BSD-3-Clause + license_family: BSD + size: 2379689 + timestamp: 1720461835526 +- kind: conda + name: libiconv + version: '1.17' + build: hcfcfb64_2 + build_number: 2 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/libiconv-1.17-hcfcfb64_2.conda + sha256: 5f844dd19b046d43174ad80c6ea75b5d504020e3b63cfbc4ace97b8730d35c7b + md5: e1eb10b1cca179f2baa3601e4efc8712 + depends: + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + license: LGPL-2.1-only + size: 636146 + timestamp: 1702682547199 +- kind: conda + name: liblapack + version: 3.9.0 + build: 25_linux64_openblas + build_number: 25 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/liblapack-3.9.0-25_linux64_openblas.conda + sha256: 9d1ff017714edb2d84868f0f931a4a0e7c289a971062b2ac66cfc8145df7e20e + md5: 4dc03a53fc69371a6158d0ed37214cd3 + depends: + - libblas 3.9.0 25_linux64_openblas + constrains: + - liblapacke 3.9.0 25_linux64_openblas + - libcblas 3.9.0 25_linux64_openblas + - blas * openblas + license: BSD-3-Clause + license_family: BSD + size: 15608 + timestamp: 1729642910812 +- kind: conda + name: liblapack + version: 3.9.0 + build: 25_osx64_openblas + build_number: 25 + subdir: osx-64 + url: https://conda.anaconda.org/conda-forge/osx-64/liblapack-3.9.0-25_osx64_openblas.conda + sha256: 2a9a6143d103e7e21511cbf439521645bdd506bfabfcac9d6398dd0562c6905c + md5: dda0e24b4605ebbd381e48606a107bed + depends: + - libblas 3.9.0 25_osx64_openblas + constrains: + - liblapacke 3.9.0 25_osx64_openblas + - blas * openblas + - libcblas 3.9.0 25_osx64_openblas + license: BSD-3-Clause + license_family: BSD + size: 15852 + timestamp: 1729643174413 +- kind: conda + name: liblapack + version: 3.9.0 + build: 25_win64_mkl + build_number: 25 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/liblapack-3.9.0-25_win64_mkl.conda + sha256: 98c13a28596389539abe3f608c6fbd2826df47671f77c58a331df878c6140c53 + md5: f716ef84564c574e8e74ae725f5d5f93 + depends: + - libblas 3.9.0 25_win64_mkl + constrains: + - blas * mkl + - libcblas 3.9.0 25_win64_mkl + - liblapacke 3.9.0 25_win64_mkl + license: BSD-3-Clause + license_family: BSD + size: 3736560 + timestamp: 1729643588182 +- kind: conda + name: libmpdec + version: 4.0.0 + build: h2466b09_0 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/libmpdec-4.0.0-h2466b09_0.conda + sha256: fc529fc82c7caf51202cc5cec5bb1c2e8d90edbac6d0a4602c966366efe3c7bf + md5: 74860100b2029e2523cf480804c76b9b + depends: + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + license: BSD-2-Clause + license_family: BSD + size: 88657 + timestamp: 1723861474602 +- kind: conda + name: libmpdec + version: 4.0.0 + build: h4bc722e_0 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/libmpdec-4.0.0-h4bc722e_0.conda + sha256: d02d1d3304ecaf5c728e515eb7416517a0b118200cd5eacbe829c432d1664070 + md5: aeb98fdeb2e8f25d43ef71fbacbeec80 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc-ng >=12 + license: BSD-2-Clause + license_family: BSD + size: 89991 + timestamp: 1723817448345 +- kind: conda + name: libmpdec + version: 4.0.0 + build: hfdf4475_0 + subdir: osx-64 + url: https://conda.anaconda.org/conda-forge/osx-64/libmpdec-4.0.0-hfdf4475_0.conda + sha256: 791be3d30d8e37ec49bcc23eb8f1e1415d911a7c023fa93685f2ea485179e258 + md5: ed625b2e59dff82859c23dd24774156b + depends: + - __osx >=10.13 + license: BSD-2-Clause + license_family: BSD + size: 76561 + timestamp: 1723817691512 +- kind: conda + name: libopenblas + version: 0.3.28 + build: openmp_h8869122_0 + subdir: osx-64 + url: https://conda.anaconda.org/conda-forge/osx-64/libopenblas-0.3.28-openmp_h8869122_0.conda + sha256: f86ff61991104bfa4fc7725c6d45c29516e7eb504a6d73ee23c50cd208900906 + md5: 6bf3c78f6d014543765570c8e1c65642 + depends: + - __osx >=10.13 + - libgfortran 5.* + - libgfortran5 >=12.3.0 + - llvm-openmp >=16.0.6 + constrains: + - openblas >=0.3.28,<0.3.29.0a0 + license: BSD-3-Clause + license_family: BSD + size: 6052706 + timestamp: 1723932292682 +- kind: conda + name: libopenblas + version: 0.3.28 + build: pthreads_h94d23a6_0 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/libopenblas-0.3.28-pthreads_h94d23a6_0.conda + sha256: 1e41a6d63e07be996238a1e840a426f86068956a45e0c0bb24e49a8dad9874c1 + md5: 9ebc9aedafaa2515ab247ff6bb509458 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc-ng >=14 + - libgfortran-ng + - libgfortran5 >=14.1.0 + constrains: + - openblas >=0.3.28,<0.3.29.0a0 + license: BSD-3-Clause + license_family: BSD + size: 5572213 + timestamp: 1723932528810 +- kind: conda + name: libsqlite + version: 3.47.0 + build: h2466b09_0 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/libsqlite-3.47.0-h2466b09_0.conda + sha256: 4f3cd0477c831eab48fb7fa3ed91d918aeb644fad9b4014726d445339750cdcc + md5: 964bef59135d876c596ae67b3315e812 + depends: + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + license: Unlicense + size: 884970 + timestamp: 1729592254351 +- kind: conda + name: libsqlite + version: 3.47.0 + build: h2f8c449_0 + subdir: osx-64 + url: https://conda.anaconda.org/conda-forge/osx-64/libsqlite-3.47.0-h2f8c449_0.conda + sha256: 6bae3280dc402c9d306275363f3a88f6a667b8e3bfa68859b7928d42f0f1495a + md5: 9dbe833ae53f6756fd87e32bd5fa508e + depends: + - __osx >=10.13 + - libzlib >=1.3.1,<2.0a0 + license: Unlicense + size: 915473 + timestamp: 1729591970061 +- kind: conda + name: libsqlite + version: 3.47.0 + build: hadc24fc_0 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/libsqlite-3.47.0-hadc24fc_0.conda + sha256: 76ffc7a5823b51735c11d535f3666b3c9c7d1519f9fbb6fa9cdff79db01960b9 + md5: 540296f0ce9d3352188c15a89b30b9ac + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + - libzlib >=1.3.1,<2.0a0 + license: Unlicense + size: 874704 + timestamp: 1729591931557 +- kind: conda + name: libstdcxx + version: 14.2.0 + build: hc0a3c3a_1 + build_number: 1 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/libstdcxx-14.2.0-hc0a3c3a_1.conda + sha256: 4661af0eb9bdcbb5fb33e5d0023b001ad4be828fccdcc56500059d56f9869462 + md5: 234a5554c53625688d51062645337328 + depends: + - libgcc 14.2.0 h77fa898_1 + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 3893695 + timestamp: 1729027746910 +- kind: conda + name: libuuid + version: 2.38.1 + build: h0b41bf4_0 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/libuuid-2.38.1-h0b41bf4_0.conda + sha256: 787eb542f055a2b3de553614b25f09eefb0a0931b0c87dbcce6efdfd92f04f18 + md5: 40b61aab5c7ba9ff276c41cfffe6b80b + depends: + - libgcc-ng >=12 + license: BSD-3-Clause + license_family: BSD + size: 33601 + timestamp: 1680112270483 +- kind: conda + name: libxml2 + version: 2.12.7 + build: h0f24e4e_4 + build_number: 4 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/libxml2-2.12.7-h0f24e4e_4.conda + sha256: ae78197961b09b0eef4ee194a44e4adc4555c0f2f20c348086b0cd8aaf2f7731 + md5: ed4d301f0d2149b34deb9c4fecafd836 + depends: + - libiconv >=1.17,<2.0a0 + - libzlib >=1.3.1,<2.0a0 + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + license: MIT + license_family: MIT + size: 1682090 + timestamp: 1721031296951 +- kind: conda + name: libzlib + version: 1.3.1 + build: h2466b09_2 + build_number: 2 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/libzlib-1.3.1-h2466b09_2.conda + sha256: ba945c6493449bed0e6e29883c4943817f7c79cbff52b83360f7b341277c6402 + md5: 41fbfac52c601159df6c01f875de31b9 + depends: + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + constrains: + - zlib 1.3.1 *_2 + license: Zlib + license_family: Other + size: 55476 + timestamp: 1727963768015 +- kind: conda + name: libzlib + version: 1.3.1 + build: hb9d3cd8_2 + build_number: 2 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/libzlib-1.3.1-hb9d3cd8_2.conda + sha256: d4bfe88d7cb447768e31650f06257995601f89076080e76df55e3112d4e47dc4 + md5: edb0dca6bc32e4f4789199455a1dbeb8 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + constrains: + - zlib 1.3.1 *_2 + license: Zlib + license_family: Other + size: 60963 + timestamp: 1727963148474 +- kind: conda + name: libzlib + version: 1.3.1 + build: hd23fc13_2 + build_number: 2 + subdir: osx-64 + url: https://conda.anaconda.org/conda-forge/osx-64/libzlib-1.3.1-hd23fc13_2.conda + sha256: 8412f96504fc5993a63edf1e211d042a1fd5b1d51dedec755d2058948fcced09 + md5: 003a54a4e32b02f7355b50a837e699da + depends: + - __osx >=10.13 + constrains: + - zlib 1.3.1 *_2 + license: Zlib + license_family: Other + size: 57133 + timestamp: 1727963183990 +- kind: conda + name: llvm-openmp + version: 19.1.2 + build: hf78d878_0 + subdir: osx-64 + url: https://conda.anaconda.org/conda-forge/osx-64/llvm-openmp-19.1.2-hf78d878_0.conda + sha256: 92231d391886bca0c0dabb42f02a37e7acb8ea84399843173fe8c294814735dd + md5: ca5f963676a9ad5383b7441368e1d107 + depends: + - __osx >=10.13 + constrains: + - openmp 19.1.2|19.1.2.* + license: Apache-2.0 WITH LLVM-exception + license_family: APACHE + size: 305589 + timestamp: 1729145249496 +- kind: conda + name: mkl + version: 2024.2.2 + build: h66d3029_14 + build_number: 14 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/mkl-2024.2.2-h66d3029_14.conda + sha256: 098ba4a3cb82f627bc79dc0ab1111b44859c9ef4aaa8d75ce043bce107770cb3 + md5: f011e7cc21918dc9d1efe0209e27fa16 + depends: + - intel-openmp 2024.* + - tbb 2021.* + license: LicenseRef-IntelSimplifiedSoftwareOct2022 + license_family: Proprietary + size: 103019089 + timestamp: 1727378392081 +- kind: conda + name: ncurses + version: '6.5' + build: he02047a_1 + build_number: 1 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/ncurses-6.5-he02047a_1.conda + sha256: 6a1d5d8634c1a07913f1c525db6455918cbc589d745fac46d9d6e30340c8731a + md5: 70caf8bb6cf39a0b6b7efc885f51c0fe + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc-ng >=12 + license: X11 AND BSD-3-Clause + size: 889086 + timestamp: 1724658547447 +- kind: conda + name: ncurses + version: '6.5' + build: hf036a51_1 + build_number: 1 + subdir: osx-64 + url: https://conda.anaconda.org/conda-forge/osx-64/ncurses-6.5-hf036a51_1.conda + sha256: b0b3180039ef19502525a2abd5833c00f9624af830fd391f851934d57bffb9af + md5: e102bbf8a6ceeaf429deab8032fc8977 + depends: + - __osx >=10.13 + license: X11 AND BSD-3-Clause + size: 822066 + timestamp: 1724658603042 +- kind: conda + name: numpy + version: 2.1.2 + build: py313h4bf6692_0 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/numpy-2.1.2-py313h4bf6692_0.conda + sha256: 1d160a3e4d96f5e1fc81a97ca849be8bba055854bcf05ed866e94987e63e03c0 + md5: 01160f6090dd2db5c0dce21712121d33 + depends: + - __glibc >=2.17,<3.0.a0 + - libblas >=3.9.0,<4.0a0 + - libcblas >=3.9.0,<4.0a0 + - libgcc >=13 + - liblapack >=3.9.0,<4.0a0 + - libstdcxx >=13 + - python >=3.13.0rc3,<3.14.0a0 + - python_abi 3.13.* *_cp313 + constrains: + - numpy-base <0a0 + license: BSD-3-Clause + license_family: BSD + size: 8493435 + timestamp: 1728240511631 +- kind: conda + name: numpy + version: 2.1.2 + build: py313hd1f2bdd_0 + subdir: osx-64 + url: https://conda.anaconda.org/conda-forge/osx-64/numpy-2.1.2-py313hd1f2bdd_0.conda + sha256: 0b2f8e2589655b568073fe56da04d29fd7dd13c02e8f7b8bedec175c76d9d93e + md5: 6b6950575916f90c82ad76e13a8a58f4 + depends: + - __osx >=10.13 + - libblas >=3.9.0,<4.0a0 + - libcblas >=3.9.0,<4.0a0 + - libcxx >=17 + - liblapack >=3.9.0,<4.0a0 + - python >=3.13.0rc3,<3.14.0a0 + - python_abi 3.13.* *_cp313 + constrains: + - numpy-base <0a0 + license: BSD-3-Clause + license_family: BSD + size: 7474292 + timestamp: 1728240385552 +- kind: conda + name: numpy + version: 2.1.2 + build: py313hd65a2fa_0 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/numpy-2.1.2-py313hd65a2fa_0.conda + sha256: 16235263d027496ece75039a5ad9063429d21bc1d4b46c79fef48232dac183a6 + md5: bedcf5207b54644dcd02e671ce3acd02 + depends: + - libblas >=3.9.0,<4.0a0 + - libcblas >=3.9.0,<4.0a0 + - liblapack >=3.9.0,<4.0a0 + - python >=3.13,<3.14.0a0 + - python_abi 3.13.* *_cp313 + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + constrains: + - numpy-base <0a0 + license: BSD-3-Clause + license_family: BSD + size: 7018073 + timestamp: 1728665195933 +- kind: conda + name: openssl + version: 3.3.2 + build: h2466b09_0 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/openssl-3.3.2-h2466b09_0.conda + sha256: a45c42f3577294e22ac39ddb6ef5a64fd5322e8a6725afefbf4f2b4109340bf9 + md5: 1dc86753693df5e3326bb8a85b74c589 + depends: + - ca-certificates + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + license: Apache-2.0 + license_family: Apache + size: 8396053 + timestamp: 1725412961673 +- kind: conda + name: openssl + version: 3.3.2 + build: hb9d3cd8_0 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/openssl-3.3.2-hb9d3cd8_0.conda + sha256: cee91036686419f6dd6086902acf7142b4916e1c4ba042e9ca23e151da012b6d + md5: 4d638782050ab6faa27275bed57e9b4e + depends: + - __glibc >=2.17,<3.0.a0 + - ca-certificates + - libgcc >=13 + license: Apache-2.0 + license_family: Apache + size: 2891789 + timestamp: 1725410790053 +- kind: conda + name: openssl + version: 3.3.2 + build: hd23fc13_0 + subdir: osx-64 + url: https://conda.anaconda.org/conda-forge/osx-64/openssl-3.3.2-hd23fc13_0.conda + sha256: 2b75d4b56e45992adf172b158143742daeb316c35274b36f385ccb6644e93268 + md5: 2ff47134c8e292868a4609519b1ea3b6 + depends: + - __osx >=10.13 + - ca-certificates + license: Apache-2.0 + license_family: Apache + size: 2544654 + timestamp: 1725410973572 +- kind: conda + name: pthreads-win32 + version: 2.9.1 + build: h2466b09_4 + build_number: 4 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/pthreads-win32-2.9.1-h2466b09_4.conda + sha256: b989bdcf0a22ba05a238adac1ad3452c11871681f565e509f629e225a26b7d45 + md5: cf98a67a1ec8040b42455002a24f0b0b + depends: + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + license: LGPL-2.1-or-later + size: 265827 + timestamp: 1728400965968 +- kind: conda + name: python + version: 3.13.0 + build: h0608dab_100_cp313 + build_number: 100 + subdir: osx-64 + url: https://conda.anaconda.org/conda-forge/osx-64/python-3.13.0-h0608dab_100_cp313.conda + sha256: f4c8ca4c34cb2a508956cfc8c2130dc30f168a75ae8254da8c43b5dce10ed2ea + md5: 9603103619775a3f99fe4b58d278775e + depends: + - __osx >=10.13 + - bzip2 >=1.0.8,<2.0a0 + - libexpat >=2.6.3,<3.0a0 + - libffi >=3.4,<4.0a0 + - libmpdec >=4.0.0,<5.0a0 + - libsqlite >=3.46.1,<4.0a0 + - libzlib >=1.3.1,<2.0a0 + - ncurses >=6.5,<7.0a0 + - openssl >=3.3.2,<4.0a0 + - python_abi 3.13.* *_cp313 + - readline >=8.2,<9.0a0 + - tk >=8.6.13,<8.7.0a0 + - tzdata + - xz >=5.2.6,<6.0a0 + license: Python-2.0 + size: 13933848 + timestamp: 1729169951268 +- kind: conda + name: python + version: 3.13.0 + build: h9ebbce0_100_cp313 + build_number: 100 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/python-3.13.0-h9ebbce0_100_cp313.conda + sha256: 6ab5179679f0909db828d8316f3b8b379014a82404807310fe7df5a6cf303646 + md5: 08e9aef080f33daeb192b2ddc7e4721f + depends: + - __glibc >=2.17,<3.0.a0 + - bzip2 >=1.0.8,<2.0a0 + - ld_impl_linux-64 >=2.36.1 + - libexpat >=2.6.3,<3.0a0 + - libffi >=3.4,<4.0a0 + - libgcc >=13 + - libmpdec >=4.0.0,<5.0a0 + - libsqlite >=3.46.1,<4.0a0 + - libuuid >=2.38.1,<3.0a0 + - libzlib >=1.3.1,<2.0a0 + - ncurses >=6.5,<7.0a0 + - openssl >=3.3.2,<4.0a0 + - python_abi 3.13.* *_cp313 + - readline >=8.2,<9.0a0 + - tk >=8.6.13,<8.7.0a0 + - tzdata + - xz >=5.2.6,<6.0a0 + license: Python-2.0 + size: 33112481 + timestamp: 1728419573472 +- kind: conda + name: python + version: 3.13.0 + build: hf5aa216_100_cp313 + build_number: 100 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/python-3.13.0-hf5aa216_100_cp313.conda + sha256: 18f3f0bd514c9101d38d57835b2d027958f3ae4b3b65c22d187a857aa26b3a08 + md5: 3c2f7ad3f598480fe2a09e4e33cb1a2a + depends: + - bzip2 >=1.0.8,<2.0a0 + - libexpat >=2.6.3,<3.0a0 + - libffi >=3.4,<4.0a0 + - libmpdec >=4.0.0,<5.0a0 + - libsqlite >=3.46.1,<4.0a0 + - libzlib >=1.3.1,<2.0a0 + - openssl >=3.3.2,<4.0a0 + - python_abi 3.13.* *_cp313 + - tk >=8.6.13,<8.7.0a0 + - tzdata + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + - xz >=5.2.6,<6.0a0 + license: Python-2.0 + size: 16641177 + timestamp: 1728417810202 +- kind: conda + name: python_abi + version: '3.13' + build: 5_cp313 + build_number: 5 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/python_abi-3.13-5_cp313.conda + sha256: 438225b241c5f9bddae6f0178a97f5870a89ecf927dfca54753e689907331442 + md5: 381bbd2a92c863f640a55b6ff3c35161 + constrains: + - python 3.13.* *_cp313 + license: BSD-3-Clause + license_family: BSD + size: 6217 + timestamp: 1723823393322 +- kind: conda + name: python_abi + version: '3.13' + build: 5_cp313 + build_number: 5 + subdir: osx-64 + url: https://conda.anaconda.org/conda-forge/osx-64/python_abi-3.13-5_cp313.conda + sha256: 075ad768648e88b78d2a94099563b43d3082e7c35979f457164f26d1079b7b5c + md5: 927a2186f1f997ac018d67c4eece90a6 + constrains: + - python 3.13.* *_cp313 + license: BSD-3-Clause + license_family: BSD + size: 6291 + timestamp: 1723823083064 +- kind: conda + name: python_abi + version: '3.13' + build: 5_cp313 + build_number: 5 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/python_abi-3.13-5_cp313.conda + sha256: 0c12cc1b84962444002c699ed21e815fb9f686f950d734332a1b74d07db97756 + md5: 44b4fe6f22b57103afb2299935c8b68e + constrains: + - python 3.13.* *_cp313 + license: BSD-3-Clause + license_family: BSD + size: 6716 + timestamp: 1723823166911 +- kind: conda + name: readline + version: '8.2' + build: h8228510_1 + build_number: 1 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/readline-8.2-h8228510_1.conda + sha256: 5435cf39d039387fbdc977b0a762357ea909a7694d9528ab40f005e9208744d7 + md5: 47d31b792659ce70f470b5c82fdfb7a4 + depends: + - libgcc-ng >=12 + - ncurses >=6.3,<7.0a0 + license: GPL-3.0-only + license_family: GPL + size: 281456 + timestamp: 1679532220005 +- kind: conda + name: readline + version: '8.2' + build: h9e318b2_1 + build_number: 1 + subdir: osx-64 + url: https://conda.anaconda.org/conda-forge/osx-64/readline-8.2-h9e318b2_1.conda + sha256: 41e7d30a097d9b060037f0c6a2b1d4c4ae7e942c06c943d23f9d481548478568 + md5: f17f77f2acf4d344734bda76829ce14e + depends: + - ncurses >=6.3,<7.0a0 + license: GPL-3.0-only + license_family: GPL + size: 255870 + timestamp: 1679532707590 +- kind: conda + name: tbb + version: 2021.13.0 + build: hc790b64_0 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/tbb-2021.13.0-hc790b64_0.conda + sha256: 990dbe4fb42f14700c22bd434d8312607bf8d0bd9f922b054e51fda14c41994c + md5: 28496a1e6af43c63927da4f80260348d + depends: + - libhwloc >=2.11.1,<2.11.2.0a0 + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + license: Apache-2.0 + license_family: APACHE + size: 151494 + timestamp: 1725532984828 +- kind: conda + name: tk + version: 8.6.13 + build: h1abcd95_1 + build_number: 1 + subdir: osx-64 + url: https://conda.anaconda.org/conda-forge/osx-64/tk-8.6.13-h1abcd95_1.conda + sha256: 30412b2e9de4ff82d8c2a7e5d06a15f4f4fef1809a72138b6ccb53a33b26faf5 + md5: bf830ba5afc507c6232d4ef0fb1a882d + depends: + - libzlib >=1.2.13,<2.0.0a0 + license: TCL + license_family: BSD + size: 3270220 + timestamp: 1699202389792 +- kind: conda + name: tk + version: 8.6.13 + build: h5226925_1 + build_number: 1 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/tk-8.6.13-h5226925_1.conda + sha256: 2c4e914f521ccb2718946645108c9bd3fc3216ba69aea20c2c3cedbd8db32bb1 + md5: fc048363eb8f03cd1737600a5d08aafe + depends: + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + license: TCL + license_family: BSD + size: 3503410 + timestamp: 1699202577803 +- kind: conda + name: tk + version: 8.6.13 + build: noxft_h4845f30_101 + build_number: 101 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/tk-8.6.13-noxft_h4845f30_101.conda + sha256: e0569c9caa68bf476bead1bed3d79650bb080b532c64a4af7d8ca286c08dea4e + md5: d453b98d9c83e71da0741bb0ff4d76bc + depends: + - libgcc-ng >=12 + - libzlib >=1.2.13,<2.0.0a0 + license: TCL + license_family: BSD + size: 3318875 + timestamp: 1699202167581 +- kind: conda + name: tzdata + version: 2024b + build: hc8b5060_0 + subdir: noarch + noarch: generic + url: https://conda.anaconda.org/conda-forge/noarch/tzdata-2024b-hc8b5060_0.conda + sha256: 4fde5c3008bf5d2db82f2b50204464314cc3c91c1d953652f7bd01d9e52aefdf + md5: 8ac3367aafb1cc0a068483c580af8015 + license: LicenseRef-Public-Domain + size: 122354 + timestamp: 1728047496079 +- kind: conda + name: ucrt + version: 10.0.22621.0 + build: h57928b3_1 + build_number: 1 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/ucrt-10.0.22621.0-h57928b3_1.conda + sha256: db8dead3dd30fb1a032737554ce91e2819b43496a0db09927edf01c32b577450 + md5: 6797b005cd0f439c4c5c9ac565783700 + constrains: + - vs2015_runtime >=14.29.30037 + license: LicenseRef-MicrosoftWindowsSDK10 + size: 559710 + timestamp: 1728377334097 +- kind: conda + name: vc + version: '14.3' + build: ha32ba9b_22 + build_number: 22 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/vc-14.3-ha32ba9b_22.conda + sha256: 2a47c5bd8bec045959afada7063feacd074ad66b170c1ea92dd139b389fcf8fd + md5: 311c9ba1dfdd2895a8cb08346ff26259 + depends: + - vc14_runtime >=14.38.33135 + track_features: + - vc14 + license: BSD-3-Clause + license_family: BSD + size: 17447 + timestamp: 1728400826998 +- kind: conda + name: vc14_runtime + version: 14.40.33810 + build: hcc2c482_22 + build_number: 22 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/vc14_runtime-14.40.33810-hcc2c482_22.conda + sha256: 4c669c65007f88a7cdd560192f7e6d5679d191ac71610db724e18b2410964d64 + md5: ce23a4b980ee0556a118ed96550ff3f3 + depends: + - ucrt >=10.0.20348.0 + constrains: + - vs2015_runtime 14.40.33810.* *_22 + license: LicenseRef-MicrosoftVisualCpp2015-2022Runtime + license_family: Proprietary + size: 750719 + timestamp: 1728401055788 +- kind: conda + name: vs2015_runtime + version: 14.40.33810 + build: h3bf8584_22 + build_number: 22 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/vs2015_runtime-14.40.33810-h3bf8584_22.conda + sha256: 80aa9932203d65a96f817b8be4fafc176fb2b3fe6cf6899ede678b8f0317fbff + md5: 8c6b061d44cafdfc8e8c6eb5f100caf0 + depends: + - vc14_runtime >=14.40.33810 + license: BSD-3-Clause + license_family: BSD + size: 17453 + timestamp: 1728400827536 +- kind: conda + name: xz + version: 5.2.6 + build: h166bdaf_0 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/xz-5.2.6-h166bdaf_0.tar.bz2 + sha256: 03a6d28ded42af8a347345f82f3eebdd6807a08526d47899a42d62d319609162 + md5: 2161070d867d1b1204ea749c8eec4ef0 + depends: + - libgcc-ng >=12 + license: LGPL-2.1 and GPL-2.0 + size: 418368 + timestamp: 1660346797927 +- kind: conda + name: xz + version: 5.2.6 + build: h775f41a_0 + subdir: osx-64 + url: https://conda.anaconda.org/conda-forge/osx-64/xz-5.2.6-h775f41a_0.tar.bz2 + sha256: eb09823f34cc2dd663c0ec4ab13f246f45dcd52e5b8c47b9864361de5204a1c8 + md5: a72f9d4ea13d55d745ff1ed594747f10 + license: LGPL-2.1 and GPL-2.0 + size: 238119 + timestamp: 1660346964847 +- kind: conda + name: xz + version: 5.2.6 + build: h8d14728_0 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/xz-5.2.6-h8d14728_0.tar.bz2 + sha256: 54d9778f75a02723784dc63aff4126ff6e6749ba21d11a6d03c1f4775f269fe0 + md5: 515d77642eaa3639413c6b1bc3f94219 + depends: + - vc >=14.1,<15 + - vs2015_runtime >=14.16.27033 + license: LGPL-2.1 and GPL-2.0 + size: 217804 + timestamp: 1660346976440 diff --git a/test/test_blob.rb b/test/test_blob.rb index 767c023f26..2ab7f1b02b 100644 --- a/test/test_blob.rb +++ b/test/test_blob.rb @@ -172,6 +172,9 @@ def test_generated # Deno generated deno.lock file assert sample_blob_memory("JSON/filenames/deno.lock").generated? + # pixi lockfile + assert sample_blob_memory("YAML/filenames/pixi.lock").generated? + # pnpm lockfile assert fixture_blob_memory("YAML/pnpm-lock.yaml").generated? From b60ef209516fd8affd1528706d317dea420f613f Mon Sep 17 00:00:00 2001 From: Spenser Black Date: Mon, 25 Nov 2024 10:50:02 -0500 Subject: [PATCH 16/22] Add `.json.example` as JSON extension (#7127) --- lib/linguist/languages.yml | 1 + samples/JSON/google-services.json.example | 41 +++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 samples/JSON/google-services.json.example diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 5843de3983..fd6d284e64 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -3272,6 +3272,7 @@ JSON: - ".har" - ".ice" - ".JSON-tmLanguage" + - ".json.example" - ".jsonl" - ".mcmeta" - ".sarif" diff --git a/samples/JSON/google-services.json.example b/samples/JSON/google-services.json.example new file mode 100644 index 0000000000..698ef12b28 --- /dev/null +++ b/samples/JSON/google-services.json.example @@ -0,0 +1,41 @@ +{ + "project_info": { + "project_id": "blueskyweb-example", + "project_number": "100000000000", + "firebase_url": "https://blueskyweb-example.firebaseio.com" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:123456789000:android:f1bf012572b04063", + "android_client_info": { + "package_name": "xyz.blueskyweb.app" + } + }, + "oauth_client": [ + { + "client_id": "123456789000.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "123456789000" + } + ], + "services": { + "analytics_service": { + "status": 1 + }, + "appinvite_service": { + "status": 1, + "other_platform_oauth_client": [] + }, + "ads_service": { + "status": 2 + } + } + } + ], + "configuration_version": "1" +} From 1297f1c2873166b2bd6081b910bbe21e90ef2a7a Mon Sep 17 00:00:00 2001 From: Spenser Black Date: Mon, 25 Nov 2024 10:50:11 -0500 Subject: [PATCH 17/22] Add `.buckconfig` to INI filenames (#7128) --- lib/linguist/languages.yml | 1 + samples/INI/filenames/.buckconfig | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 samples/INI/filenames/.buckconfig diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index fd6d284e64..2f1d4d2500 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -3059,6 +3059,7 @@ INI: - ".properties" - ".url" filenames: + - ".buckconfig" - ".coveragerc" - ".flake8" - ".pylintrc" diff --git a/samples/INI/filenames/.buckconfig b/samples/INI/filenames/.buckconfig new file mode 100644 index 0000000000..934256cb29 --- /dev/null +++ b/samples/INI/filenames/.buckconfig @@ -0,0 +1,6 @@ + +[android] + target = Google Inc.:Google APIs:23 + +[maven_repositories] + central = https://repo1.maven.org/maven2 From 12adec9f61d60f208d1912cfb16cd4f999272014 Mon Sep 17 00:00:00 2001 From: MalloryA Date: Mon, 25 Nov 2024 10:50:29 -0500 Subject: [PATCH 18/22] Add Hare (#7130) --- lib/linguist/languages.yml | 8 + samples/Hare/contains.ha | 47 +++++ samples/Hare/iter.ha | 194 +++++++++++++++++++++ samples/Hare/types.ha | 346 +++++++++++++++++++++++++++++++++++++ 4 files changed, 595 insertions(+) create mode 100644 samples/Hare/contains.ha create mode 100644 samples/Hare/iter.ha create mode 100644 samples/Hare/types.ha diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 2f1d4d2500..c2098e1c06 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -2946,6 +2946,14 @@ Harbour: tm_scope: source.harbour ace_mode: text language_id: 156 +Hare: + type: programming + color: "#9d7424" + extensions: + - ".ha" + ace_mode: text + language_id: 463518941 + tm_scope: none Haskell: type: programming color: "#5e5086" diff --git a/samples/Hare/contains.ha b/samples/Hare/contains.ha new file mode 100644 index 0000000000..283337f19d --- /dev/null +++ b/samples/Hare/contains.ha @@ -0,0 +1,47 @@ +// SPDX-License-Identifier: MPL-2.0 +// (c) Hare authors + +// Returns true if a byte slice contains a byte or a sequence of bytes. +export fn contains(haystack: []u8, needles: (u8 | []u8)...) bool = { + for (let i = 0z; i < len(needles); i += 1) { + const matched = match (needles[i]) { + case let b: u8 => + yield index_byte(haystack, b) is size; + case let b: []u8 => + yield index_slice(haystack, b) is size; + }; + if (matched) { + return true; + }; + }; + return false; +}; + +// Returns true if "in" has the given prefix, false otherwise +export fn hasprefix(in: []u8, prefix: []u8) bool = { + return len(in) >= len(prefix) && equal(in[..len(prefix)], prefix); +}; + +@test fn hasprefix() void = { + assert(hasprefix([], [])); + assert(hasprefix([0], [])); + assert(!hasprefix([], [0])); + assert(hasprefix([1, 2, 3], [1, 2])); + assert(!hasprefix([1, 2, 3], [1, 1])); + assert(!hasprefix([1, 2, 3], [1, 2, 3, 4])); +}; + +// Returns true if "in" has the given suffix, false otherwise +export fn hassuffix(in: []u8, suffix: []u8) bool = { + return len(in) >= len(suffix) + && equal(in[len(in) - len(suffix)..], suffix); +}; + +@test fn hassuffix() void = { + assert(hassuffix([], [])); + assert(hassuffix([0], [])); + assert(!hassuffix([], [0])); + assert(hassuffix([1, 2, 3], [2, 3])); + assert(!hassuffix([1, 2, 3], [2, 2])); + assert(hassuffix([1, 2, 3, 4], [2, 3, 4])); +}; diff --git a/samples/Hare/iter.ha b/samples/Hare/iter.ha new file mode 100644 index 0000000000..5290ac51bd --- /dev/null +++ b/samples/Hare/iter.ha @@ -0,0 +1,194 @@ +// SPDX-License-Identifier: MPL-2.0 +// (c) Hare authors + +use ascii; +use strings; +use strconv; +use types; + +// Tagged union of the [[formattable]] types and [[mods]]. Used for +// functions which accept format strings. +export type field = (...formattable | *mods); + +// Tagged union of all types which are formattable. +export type formattable = (...types::numeric | uintptr | str | rune | bool | + nullable *opaque | void); + +// Negative modifier. Specifies for numerical arguments when to prepend a plus +// or minus sign or a blank space. +export type neg = enum { + NONE, + SPACE, + PLUS, +}; + +// Alignment modifier. Specifies how to align an argument within a given width. +export type alignment = enum { + RIGHT, + CENTER, + LEFT, +}; + +// Specifies how to format an argument. +export type mods = struct { + alignment: alignment, + pad: rune, + neg: neg, + width: size, + prec: size, + base: strconv::base, + ffmt: strconv::ffmt, + fflags: strconv::fflags, +}; + +type iterator = struct { + iter: strings::iterator, + args: []field, + idx: size, + checkunused: bool, +}; + +fn iter(fmt: str, args: []field) iterator = iterator { + iter = strings::iter(fmt), + args = args, + idx = 0, + checkunused = true, +}; + +fn next(it: *iterator) (str | (formattable, mods) | done) = { + let r = match (strings::next(&it.iter)) { + case done => + return done; + case let r: rune => + yield r; + }; + switch (r) { + case '{' => void; // handled below + case '}' => + match (strings::next(&it.iter)) { + case done => + abort("Invalid format string (hanging '}')"); + case let r: rune => + assert(r == '}', "Invalid format string (hanging '}')"); + }; + return "}"; + case => + strings::prev(&it.iter); + let start = it.iter; + for (let r => strings::next(&it.iter)) { + if (r == '{' || r == '}') { + strings::prev(&it.iter); + break; + }; + }; + return strings::slice(&start, &it.iter); + }; + + r = getrune(it); + if (r == '{') { + return "{"; + }; + + let idx = if (ascii::isdigit(r)) { + strings::prev(&it.iter); + it.checkunused = false; + defer r = getrune(it); + yield scan_sz(it); + } else { + defer it.idx += 1; + yield it.idx; + }; + assert(idx < len(it.args), "Not enough parameters given"); + let arg = it.args[idx] as formattable; + let mod = mods { ... }; + + switch (r) { + case ':' => + scan_modifiers(it, &mod); + case '%' => + r = getrune(it); + let idx = if (ascii::isdigit(r)) { + strings::prev(&it.iter); + it.checkunused = false; + defer r = getrune(it); + yield scan_sz(it); + } else { + defer it.idx += 1; + yield it.idx; + }; + assert(idx < len(it.args), "Not enough parameters given"); + mod = *(it.args[idx] as *mods); + assert(r == '}', "Invalid format string (didn't find '}' after modifier index)"); + case '}' => void; + case => abort("Invalid format string"); + }; + + return (arg, mod); +}; + +fn scan_modifiers(it: *iterator, mod: *mods) void = { + mod.pad = ' '; + for (true) switch (getrune(it)) { + // alignment + case '-' => mod.alignment = alignment::LEFT; + case '=' => mod.alignment = alignment::CENTER; + // padding + case '_' => mod.pad = getrune(it); + // negation + case ' ' => mod.neg = neg::SPACE; + case '+' => mod.neg = neg::PLUS; + // base + case 'x' => mod.base = strconv::base::HEX_LOWER; + case 'X' => mod.base = strconv::base::HEX_UPPER; + case 'o' => mod.base = strconv::base::OCT; + case 'b' => mod.base = strconv::base::BIN; + // ffmt + case 'e' => mod.ffmt = strconv::ffmt::E; + case 'f' => mod.ffmt = strconv::ffmt::F; + case 'g' => mod.ffmt = strconv::ffmt::G; + // fflags + case 'F' => + switch (getrune(it)) { + case 's' => mod.fflags |= strconv::fflags::SHOW_POS; + case '.' => mod.fflags |= strconv::fflags::SHOW_POINT; + case 'U' => mod.fflags |= strconv::fflags::UPPERCASE; + case 'E' => mod.fflags |= strconv::fflags::UPPER_EXP; + case 'S' => mod.fflags |= strconv::fflags::SHOW_POS_EXP; + case '2' => mod.fflags |= strconv::fflags::SHOW_TWO_EXP_DIGITS; + case => abort("Invalid float flag"); + }; + // precision + case '.' => mod.prec = scan_sz(it); + // width + case '1', '2', '3', '4', '5', '6', '7', '8', '9' => + strings::prev(it); + mod.width = scan_sz(it); + case => + strings::prev(it); + break; + }; + assert(getrune(it) == '}', "Invalid format string (unterminated '{')"); +}; + +fn scan_sz(it: *iterator) size = { + let start = it.iter; + assert(ascii::isdigit(getrune(it))); + for (ascii::isdigit(getrune(it))) void; + strings::prev(&it.iter); + + match (strconv::stoz(strings::slice(&start, &it.iter))) { + case strconv::invalid => + abort("Invalid format string (invalid integer)"); + case strconv::overflow => + abort("Invalid format string (integer overflow)"); + case let z: size => + return z; + }; +}; + +fn getrune(it: *iterator) rune = match (strings::next(&it.iter)) { +case done => + abort("Invalid format string (unterminated '{')"); +case let r: rune => + return r; +}; diff --git a/samples/Hare/types.ha b/samples/Hare/types.ha new file mode 100644 index 0000000000..5688fe7a1a --- /dev/null +++ b/samples/Hare/types.ha @@ -0,0 +1,346 @@ +// SPDX-License-Identifier: MPL-2.0 +// (c) Hare authors + +use encoding::utf8; +use errors; +use io; +use strings; +use time; + +// An entry of a particular type was sought, but is something else in practice. +// For example, opening a file with [[iter]]. +export type wrongtype = !void; + +// Returned from [[rename]] if this rename is not possible due to technical +// constraints, such as if it would cause a file to move between filesystems. In +// this situation, other operations (such as copy & remove) may succeed if +// attempted. +export type cannotrename = !void; + +// All possible fs error types. +export type error = !( + errors::noentry | + errors::noaccess | + errors::exists | + errors::busy | + errors::invalid | + errors::unsupported | + utf8::invalid | + wrongtype | + cannotrename | + io::error); + +// Returns a human-friendly representation of an error. +export fn strerror(err: error) const str = match (err) { +case wrongtype => + yield "Wrong entry type for requested operation"; +case cannotrename => + yield "Unable to perform rename operation (try move instead)"; +case errors::noentry => + yield "File or directory not found"; +case errors::noaccess => + yield "Permission denied"; +case errors::exists => + yield "File or directory exists"; +case errors::invalid => + yield "Invalid argument"; +case errors::busy => + yield "Device is busy"; +case errors::unsupported => + yield "Operation not supported"; +case let err: utf8::invalid => + yield utf8::strerror(err); +case let err: io::error => + yield io::strerror(err); +}; + +// File mode information. These bits do not necessarily reflect the underlying +// operating system's mode representation, though they were chosen to be +// consistent with typical Unix file permissions. All implementations shall +// support at least USER_RW, DIR, and REG. +export type mode = enum uint { + // Read, write, and execute permissions for the file owner + USER_RWX = 0o700, + // Read and write permissions for the file owner + USER_RW = 0o600, + // Read and execute permissions for the file owner + USER_RX = 0o500, + // Read permissions for the file owner + USER_R = 0o400, + // Write permissions for the file owner + USER_W = 0o200, + // Execute permissions for the file owner + USER_X = 0o100, + + // Read, write, and execute permissions for group members + GROUP_RWX = 0o070, + // Read and write permissions for group members + GROUP_RW = 0o060, + // Read and execute permissions for group members + GROUP_RX = 0o050, + // Read permissions for group members + GROUP_R = 0o040, + // Write permissions for group members + GROUP_W = 0o020, + // Execute permissions for group members + GROUP_X = 0o010, + + // Read, write, and execute permissions for other users + OTHER_RWX = 0o007, + // Read and write permissions for other users + OTHER_RW = 0o006, + // Read and execute permissions for other users + OTHER_RX = 0o005, + // Read permissions for other users + OTHER_R = 0o004, + // Write permissions for other users + OTHER_W = 0o002, + // Execute permissions for other users + OTHER_X = 0o001, + + // Entry has the set-uid bit set + SETUID = 0o4000, + // Entry has the set-gid bit set + SETGID = 0o2000, + // Entry has the sticky bit set + STICKY = 0o1000, + + // Entry is of an unknown type + UNKNOWN = 0, + // Entry is a FIFO (named pipe) + FIFO = 0o010000, + // Entry is a directory + DIR = 0o040000, + // Entry is a character device + CHR = 0o020000, + // Entry is a block device + BLK = 0o060000, + // Entry is a regular file + REG = 0o100000, + // Entry is a symbolic link + LINK = 0o120000, + // Entry is a Unix socket + SOCK = 0o140000, +}; + +// A mask defining what items are populated in the stat structure. +export type stat_mask = enum uint { + UID = 1 << 0, + GID = 1 << 1, + SIZE = 1 << 2, + INODE = 1 << 3, + ATIME = 1 << 4, + MTIME = 1 << 5, + CTIME = 1 << 6, +}; + +// Information about a file or directory. The mask field defines what other +// fields are set; mode is always set. +export type filestat = struct { + mask: stat_mask, + mode: mode, + uid: uint, + gid: uint, + sz: size, + inode: u64, + atime: time::instant, + mtime: time::instant, + ctime: time::instant, +}; + +// An entry in a directory. This may be borrowed from the filesystem's internal +// state. If you want to keep this around beyond one call to [[next]], use +// [[dirent_dup]]. +export type dirent = struct { + // The name of this entry. Not fully qualified: for example, + // "foo/bar/baz.txt" would store "baz.txt" here. + name: str, + + // The type of this entry. The permission bits may be unset. + ftype: mode, +}; + +// Duplicates a [[dirent]] object. Call [[dirent_finish]] to get rid of it +// later. +export fn dirent_dup(e: *dirent) dirent = { + let new = *e; + new.name = strings::dup(e.name); + return new; +}; + +// Frees memory associated with a [[dirent]] object which was duplicated with +// [[dirent_dup]]. +export fn dirent_finish(e: *dirent) void = free(e.name); + +// Flags to use for opening a file. Not all operating systems support all flags; +// at a minimum, RDONLY, WRONLY, RDWR, CREATE, and TRUNC will be supported. +// Note that NOCTTY and CLOEXEC are on by default, and the CTTY/NOCLOEXEC flags +// respectively disable them. +export type flag = enum int { + RDONLY = 0, + WRONLY = 1, + RDWR = 2, + CREATE = 0o100, + EXCL = 0o200, + CTTY = 0o400, + TRUNC = 0o1000, + APPEND = 0o2000, + NONBLOCK = 0o4000, + DSYNC = 0o10000, + SYNC = 0o4010000, + RSYNC = 0o4010000, + DIRECTORY = 0o200000, + NOFOLLOW = 0o400000, + NOATIME = 0o1000000, + NOCLOEXEC = 0o2000000, + PATH = 0o10000000, + TMPFILE = 0o20200000, +}; + +export type closefunc = fn(fs: *fs) void; +export type removefunc = fn(fs: *fs, path: str) (void | error); +export type renamefunc = fn(fs: *fs, oldpath: str, newpath: str) (void | error); +export type iterfunc = fn(fs: *fs, path: str) (*iterator | error); +export type statfunc = fn(fs: *fs, path: str) (filestat | error); +export type fstatfunc = fn(fs: *fs, file: io::file) (filestat | error); +export type mkdirfunc = fn(fs: *fs, path: str, mode: mode) (void | error); +export type rmdirfunc = fn(fs: *fs, path: str) (void | error); +export type chmodfunc = fn(fs: *fs, path: str, mode: mode) (void | error); +export type fchmodfunc = fn(fd: io::file, mode: mode) (void | error); +export type chownfunc = fn(fs: *fs, path: str, uid: uint, gid: uint) (void | error); +export type fchownfunc = fn(fd: io::file, uid: uint, gid: uint) (void | error); +export type chtimesfunc = fn(fs: *fs, path: str, atime: (time::instant | void), + mtime: (time::instant | void)) (void | error); +export type fchtimesfunc = fn(fd: io::file, atime: (time::instant | void), + mtime: (time::instant | void)) (void | error); +export type resolvefunc = fn(fs: *fs, path: str) str; +export type readlinkfunc = fn(fs: *fs, path: str) (str | error); +export type linkfunc = fn(fs: *fs, old: str, new: str) (void | error); +export type symlinkfunc = fn(fs: *fs, target: str, path: str) (void | error); + +export type openfunc = fn( + fs: *fs, + path: str, + flags: flag, +) (io::handle | error); + +export type openfilefunc = fn( + fs: *fs, + path: str, + flags: flag, +) (io::file | error); + +export type createfunc = fn( + fs: *fs, + path: str, + mode: mode, + flags: flag, +) (io::handle | error); + +export type createfilefunc = fn( + fs: *fs, + path: str, + mode: mode, + flags: flag, +) (io::file | error); + +// An abstract implementation of a filesystem, which provides common filesystem +// operations such as file creation and deletion, but which may be backed by any +// underlying storage system. See [[os::cwd]] for access to the host filesystem. +// +// To create a custom filesystem implementation, embed this type as the first +// member of a struct with user-specific data and fill out these fields as +// appropriate. +export type fs = struct { + // Frees resources associated with this filesystem. + close: nullable *closefunc, + + // Opens a file. + open: nullable *openfunc, + + // Opens a file as an [[io::file]]. + openfile: nullable *openfilefunc, + + // Creates a new file. + create: nullable *createfunc, + + // Creates a new file as an [[io::file]]. + createfile: nullable *createfilefunc, + + // Removes a file. + remove: nullable *removefunc, + + // Renames a file. + rename: nullable *renamefunc, + + // Returns an iterator for a path, which yields the contents of a + // directory. Pass empty string to yield from the root. + // + // The iterator must return all entries without error. If an error would + // occur, it should be identified here and returned upfront. + iter: nullable *iterfunc, + + // Obtains information about a file or directory. If the target is a + // symbolic link, information is returned about the link, not its + // target. + stat: nullable *statfunc, + + // Obtains information about an [[io::file]]. + fstat: nullable *fstatfunc, + + // Returns the path referred to by a symbolic link. The caller will free + // the return value. + readlink: nullable *readlinkfunc, + + // Creates a directory. + mkdir: nullable *mkdirfunc, + + // Removes a directory. The target directory must be empty. + rmdir: nullable *rmdirfunc, + + // Changes mode flags on a file or directory. + chmod: nullable *chmodfunc, + + // Changes mode flags on a [[io::file]]. + fchmod: nullable *fchmodfunc, + + // Changes ownership of a file. + chown: nullable *chownfunc, + + // Changes ownership of a [[io::file]]. + fchown: nullable *fchownfunc, + + // Changes access and modification time of a file. + chtimes: nullable *chtimesfunc, + + // Changes access and modification time of an [[io::file]]. + fchtimes: nullable *fchtimesfunc, + + // Resolves a path to its absolute, normalized value. If the fs + // implementation does not provide this, [resolve] presumes that + // relative paths are rooted (i.e. "foo" == "/foo"). + resolve: nullable *resolvefunc, + + // Creates a new (hard) link. + link: nullable *linkfunc, + + // Creates a new symbolic link. + symlink: nullable *symlinkfunc, +}; + +// A function which returns the next directory from an [[iterator]]. +export type nextfunc = fn(iter: *iterator) (dirent | done | error); + +// A function which frees state associated with an [[iterator]]. +export type finishfunc = fn(iter: *iterator) void; + +// A directory iterator. To implement a directory iterator for a filesystem, +// subtype this struct to store any necessary state and populate the pointers +// with your implementation. +export type iterator = struct { + // Returns the next member of the directory, or done if there are none + // remaining. + next: *nextfunc, + // Frees resources associated with the iterator. + finish: nullable *finishfunc, +}; From 91fdd46bea00a07fe22c89ea140e3f1a3c9decd2 Mon Sep 17 00:00:00 2001 From: Spenser Black Date: Mon, 25 Nov 2024 10:50:35 -0500 Subject: [PATCH 19/22] Add `.easignore` as Ignore List filename (#7129) --- lib/linguist/languages.yml | 1 + samples/Ignore List/filenames/.easignore | 101 +++++++++++++++++++++++ 2 files changed, 102 insertions(+) create mode 100644 samples/Ignore List/filenames/.easignore diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index c2098e1c06..d8768015b8 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -3121,6 +3121,7 @@ Ignore List: - ".coffeelintignore" - ".cvsignore" - ".dockerignore" + - ".easignore" - ".eleventyignore" - ".eslintignore" - ".gitignore" diff --git a/samples/Ignore List/filenames/.easignore b/samples/Ignore List/filenames/.easignore new file mode 100644 index 0000000000..95d14f78b7 --- /dev/null +++ b/samples/Ignore List/filenames/.easignore @@ -0,0 +1,101 @@ +# OSX +# +.DS_Store + +# Xcode +# +build/ +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata +*.xccheckout +*.moved-aside +DerivedData +*.hmap +*.ipa +*.xcuserstate + +# Android/IntelliJ +# +build/ +.idea +.gradle +local.properties +*.iml +*.hprof + +# node.js +# +node_modules/ +npm-debug.log +yarn-error.log + +# BUCK +buck-out/ +\.buckd/ +*.keystore +!debug.keystore + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://docs.fastlane.tools/best-practices/source-control/ + +*/fastlane/report.xml +*/fastlane/Preview.html +*/fastlane/screenshots + +# Bundle artifact +*.jsbundle + +# Ruby / CocoaPods +/ios/Pods/ +/vendor/bundle/ + +# Testing +coverage/ +junit.xml +artifacts + +# Web bundle outputs +/dist/ + +# Expo +.expo/ +dist/ +*.jks +*.p8 +*.p12 +*.key +*.mobileprovision +*.orig.* +web-build/ + +# Temporary files created by Metro to check the health of the file watcher +.metro-health-check* + +# VSCode +.vscode + +# gitignore and github actions +!.gitignore +!.github + + +# Android & iOS folders +/android/ +/ios/ + +# environment variables +.env.* + +# Firebase (Android) Google services +# INCLUDED: google-services.json From 4eb3edd44be3ece6d5f6c5080d77abc17582411c Mon Sep 17 00:00:00 2001 From: Martin Leduc <31558169+DecimalTurn@users.noreply.github.com> Date: Mon, 25 Nov 2024 10:50:36 -0500 Subject: [PATCH 20/22] Change CSS colour to `rebeccapurple` (#7136) Change CSS color --- lib/linguist/languages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index d8768015b8..ddf7c45e06 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -908,7 +908,7 @@ CSS: ace_mode: css codemirror_mode: css codemirror_mime_type: text/css - color: "#563d7c" + color: "#663399" extensions: - ".css" language_id: 50 From eb887326d5a92be120d237ea9389e4bb1eed4778 Mon Sep 17 00:00:00 2001 From: Victoria Dye Date: Mon, 25 Nov 2024 07:54:09 -0800 Subject: [PATCH 21/22] Refactor `Linguist::Repository` to isolate Rugged usage (#7094) * lib/linguist/source: add Repository & Diff interfaces Add interfaces representing a generic "Repository" and "Diff", containing functions currently handled by the Rugged repository instance in 'Linguist::Repository'. Inheriting from these interfaces will allow for alternative implementations of the functions used to traverse and analyze a repository, e.g. using a different API for Git storage or a different SCM altogether. For now, the interfaces are unused. Signed-off-by: Victoria Dye * lib/linguist/source: add RuggedRepository Add Rugged implementations of the 'Repository', 'Diff', and 'Diff::Delta' interfaces matching existing usage in 'Linguist::Repository' & 'Linguist::LazyBlob'. In a subsequent commit, this will allow us to substitute an instance of the 'Repository' interface for what is currently direct usage of a 'Rugged::Repository'. Signed-off-by: Victoria Dye * lib/linguist/repository.rb: use Linguist::Source::Repository Change the 'repository' argument to 'Linguist::Repository' && 'Linguist::LazyBlob' from a 'Rugged::Repository' to an instance of 'Linguist::Source::Repository'. This will allow users of Linguist to easily configure and use a custom repository interface. There are two methods that don't have a clear or useful parallel in a generic repository interface and are more specific to Rugged: 'read_index' and 'current_tree'. For both of these methods, raise a 'NotImplementedError' if any repository instance that's not a 'RuggedRepository' calls them, and return the legacy value for ones that are 'RuggedRepository'. Also for backward-compatibility purposes, users can still initialize a 'Linguist::Repository' or 'Linguist::LazyBlob' with a 'Rugged::Repository'; it will be wrapped in the 'Linguist::Source::RuggedRepository' in the initialization method. Finally, update 'test_repository.rb' to test both a 'RuggedRepository' instance and a mocked always-empty repository. Signed-off-by: Victoria Dye * lib/linguist/source/rugged.rb: add method_missing delegation Add a 'method_missing' implementation to 'RuggedRepository' to delegate all unmatched methods to the internal Rugged objects of each. This is done for backward-compatibility purposes; users of Linguist can access the 'repository' member of 'Linguist::Repository', so they may rely on interacting directly with the 'Rugged::Repository'. The 'method_missing' delegate ensures that those interactions will generally continue to work (the main exception being explicit type checking performed on 'Linguist::Repository.repository'). Signed-off-by: Victoria Dye --------- Signed-off-by: Victoria Dye --- lib/linguist/lazy_blob.rb | 22 ++++-- lib/linguist/repository.rb | 31 ++++---- lib/linguist/source/diff.rb | 72 ++++++++++++++++++ lib/linguist/source/repository.rb | 64 ++++++++++++++++ lib/linguist/source/rugged.rb | 95 ++++++++++++++++++++++++ test/test_repository.rb | 119 ++++++++++++++++++++++++------ 6 files changed, 359 insertions(+), 44 deletions(-) create mode 100644 lib/linguist/source/diff.rb create mode 100644 lib/linguist/source/repository.rb create mode 100644 lib/linguist/source/rugged.rb diff --git a/lib/linguist/lazy_blob.rb b/lib/linguist/lazy_blob.rb index 98e75efb1f..3d60b60ea6 100644 --- a/lib/linguist/lazy_blob.rb +++ b/lib/linguist/lazy_blob.rb @@ -1,6 +1,7 @@ require 'linguist/blob_helper' require 'linguist/language' -require 'rugged' +require 'linguist/source/repository' +require 'linguist/source/rugged' module Linguist class LazyBlob @@ -10,8 +11,11 @@ class LazyBlob 'linguist-generated', 'linguist-detectable'] - GIT_ATTR_OPTS = { :priority => [:index], :skip_system => true } - GIT_ATTR_FLAGS = Rugged::Repository::Attributes.parse_opts(GIT_ATTR_OPTS) + # DEPRECATED: use Linguist::Source::RuggedRepository::GIT_ATTR_OPTS instead + GIT_ATTR_OPTS = Linguist::Source::RuggedRepository::GIT_ATTR_OPTS + + # DEPRECATED: use Linguist::Source::RuggedRepository::GIT_ATTR_FLAGS instead + GIT_ATTR_FLAGS = Linguist::Source::RuggedRepository::GIT_ATTR_FLAGS include BlobHelper @@ -25,7 +29,12 @@ class LazyBlob alias :name :path def initialize(repo, oid, path, mode = nil) - @repository = repo + @repository = if repo.is_a? Linguist::Source::Repository + repo + else + # Allow this for backward-compatibility purposes + Linguist::Source::RuggedRepository.new(repo) + end @oid = oid @path = path @mode = mode @@ -33,8 +42,7 @@ def initialize(repo, oid, path, mode = nil) end def git_attributes - @git_attributes ||= repository.fetch_attributes( - name, GIT_ATTR, GIT_ATTR_FLAGS) + @git_attributes ||= repository.load_attributes_for_path(name, GIT_ATTR) end def documentation? @@ -106,7 +114,7 @@ def boolean_attribute(attribute) end def load_blob! - @data, @size = Rugged::Blob.to_buffer(repository, oid, MAX_SIZE) if @data.nil? + @data, @size = repository.load_blob(oid, MAX_SIZE) if @data.nil? end end end diff --git a/lib/linguist/repository.rb b/lib/linguist/repository.rb index 6ef697f07b..9b4fa0ba48 100644 --- a/lib/linguist/repository.rb +++ b/lib/linguist/repository.rb @@ -1,5 +1,6 @@ require 'linguist/lazy_blob' -require 'rugged' +require 'linguist/source/repository' +require 'linguist/source/rugged' module Linguist # A Repository is an abstraction of a Grit::Repo or a basic file @@ -23,14 +24,19 @@ def self.incremental(repo, commit_oid, old_commit_oid, old_stats, max_tree_size # Public: Initialize a new Repository to be analyzed for language # data # - # repo - a Rugged::Repository object + # repo - a Linguist::Source::Repository object # commit_oid - the sha1 of the commit that will be analyzed; # this is usually the master branch # max_tree_size - the maximum tree size to consider for analysis (default: MAX_TREE_SIZE) # # Returns a Repository def initialize(repo, commit_oid, max_tree_size = MAX_TREE_SIZE) - @repository = repo + @repository = if repo.is_a? Linguist::Source::Repository + repo + else + # Allow this for backward-compatibility purposes + Linguist::Source::RuggedRepository.new(repo) + end @commit_oid = commit_oid @max_tree_size = max_tree_size @@ -123,26 +129,25 @@ def cache end def read_index - attr_index = Rugged::Index.new - attr_index.read_tree(current_tree) - repository.index = attr_index + raise NotImplementedError, "read_index is deprecated" unless repository.is_a? Linguist::Source::RuggedRepository + repository.set_attribute_source(@commit_oid) end def current_tree - @tree ||= Rugged::Commit.lookup(repository, @commit_oid).tree + raise NotImplementedError, "current_tree is deprecated" unless repository.is_a? Linguist::Source::RuggedRepository + repository.get_tree(@commit_oid) end protected def compute_stats(old_commit_oid, cache = nil) - return {} if current_tree.count_recursive(@max_tree_size) >= @max_tree_size + return {} if repository.get_tree_size(@commit_oid, @max_tree_size) >= @max_tree_size - old_tree = old_commit_oid && Rugged::Commit.lookup(repository, old_commit_oid).tree - read_index - diff = Rugged::Tree.diff(repository, old_tree, current_tree) + repository.set_attribute_source(@commit_oid) + diff = repository.diff(old_commit_oid, @commit_oid) # Clear file map and fetch full diff if any .gitattributes files are changed if cache && diff.each_delta.any? { |delta| File.basename(delta.new_file[:path]) == ".gitattributes" } - diff = Rugged::Tree.diff(repository, old_tree = nil, current_tree) + diff = repository.diff(nil, @commit_oid) file_map = {} else file_map = cache ? cache.dup : {} @@ -153,7 +158,7 @@ def compute_stats(old_commit_oid, cache = nil) new = delta.new_file[:path] file_map.delete(old) - next if delta.binary + next if delta.binary? if [:added, :modified].include? delta.status # Skip submodules and symlinks diff --git a/lib/linguist/source/diff.rb b/lib/linguist/source/diff.rb new file mode 100644 index 0000000000..332dbadb11 --- /dev/null +++ b/lib/linguist/source/diff.rb @@ -0,0 +1,72 @@ +require 'linguist/generated' +require 'cgi' +require 'charlock_holmes' +require 'mini_mime' +require 'yaml' + +module Linguist + module Source + # Diff is an interface representing a diff between two trees. It is composed + # of a collection of iterable deltas between before/after states of files. + class Diff + # A Delta represents a single file's before/after state in a diff. + class Delta + # Public: get the status of the file's "after" state as compared to + # "before". Valid status values include: + # + # - :added + # - :deleted + # - :modified + # - :renamed + # - :copied + # - :ignored + # - :untracked + # - :typechange + # + # Returns the status. + def status + raise NotImplementedError + end + + # Public: determine whether the file delta is binary. + # + # Returns true if the delta is binary, false otherwise. + def binary? + raise NotImplementedError + end + + # Public: get the metadata of the "before" file in the delta. The + # metadata is represented as a Hash with the keys: + # + # - :path (string) + # - :oid (string) + # - :mode (integer) + # + # Returns the entry metadata hash. + def old_file + raise NotImplementedError + end + + # Public: get the metadata of the "after" file in the delta. The + # metadata is represented as a Hash with the keys: + # + # - :path (string) + # - :oid (string) + # - :mode (integer) + # + # Returns the entry metadata hash. + def new_file + raise NotImplementedError + end + end + + # Public: iterate through each delta of the given diff. Yields a single + # delta to the given block. + # + # Returns nothing. + def each_delta + raise NotImplementedError + end + end + end +end diff --git a/lib/linguist/source/repository.rb b/lib/linguist/source/repository.rb new file mode 100644 index 0000000000..d6681c8dc5 --- /dev/null +++ b/lib/linguist/source/repository.rb @@ -0,0 +1,64 @@ +module Linguist + module Source + # Repository is an interface for providing direct access to functionality in + # a repository of files whose contents can be scanned for language + # information. + class Repository + # Public: get the number of entries in the root tree of the given commit, + # with an optional maximum value. + # + # commit_id - the string unique identifier of the commit to analyze. + # limit - (Optional) the integer maximum number of tree entries to + # count. + # + # Returns the number of entries in the tree or 'limit', whichever is + # smaller. + def get_tree_size(commit_id, limit = nil) + raise NotImplementedError + end + + # Public: set the commit whose .gitattributes file(s) should be used as + # the source of attribute information in 'load_attributes_for_path'. + # + # commit_id - the string unique identifier of the attribute source commit. + # + # Returns nothing. + def set_attribute_source(commit_id) + raise NotImplementedError + end + + # Public: read the data and size information for the specified file blob. + # + # blob_id - the string unique identifier of the blob to read. + # max_size - the integer maximum size in bytes to read from the blob. + # + # Returns the (possibly truncated) byte string of blob content and + # the full, untruncated size of the blob. + def load_blob(blob_id, max_size) + raise NotImplementedError + end + + # Public: look up the attribute values for a given path. + # + # path - the path for which we want attribute values. + # attr_names - the attributes to read for the given path. + # + # Returns a Hash mapping attribute names to their corresponding values. + def load_attributes_for_path(path, attr_names) + raise NotImplementedError + end + + # Public: compute the diff between the given old and new commits. + # + # old_commit - the string unique identifier of the "before" state of the + # diff, or nil (representing an empty tree). + # new_commit - the string unique identifier of the "after" state of the + # diff, or nil (representing an empty tree). + # + # Returns a Source::Diff. + def diff(old_commit, new_commit) + raise NotImplementedError + end + end + end +end diff --git a/lib/linguist/source/rugged.rb b/lib/linguist/source/rugged.rb new file mode 100644 index 0000000000..b246009b16 --- /dev/null +++ b/lib/linguist/source/rugged.rb @@ -0,0 +1,95 @@ +require 'rugged' +require 'linguist/source/diff' + +module Linguist + module Source + # RuggedRepository is an implementation of the Source::Repository abstract + # class. It represents a Git repository that is accessed using the libgit2 + # wrapper Rugged. + class RuggedRepository < Linguist::Source::Repository + + class Diff < Linguist::Source::Diff + class Delta < Linguist::Source::Diff::Delta + def initialize(rugged_delta) + @delta = rugged_delta + end + + def status; @delta.status; end + + def binary?; @delta.binary; end + + def old_file; @delta.old_file; end + + def new_file; @delta.new_file; end + end + + def initialize(rugged_diff) + @diff = rugged_diff + end + + def each_delta(&block) + @diff.each_delta.map do |delta| + Delta.new(delta) + end.each(&block) + end + end + + GIT_ATTR_OPTS = { :priority => [:index], :skip_system => true } + GIT_ATTR_FLAGS = Rugged::Repository::Attributes.parse_opts(GIT_ATTR_OPTS) + + def initialize(rugged) + @rugged = rugged + @tree_map = {} + @attr_source = nil + end + + def get_tree_size(commit_id, limit) + get_tree(commit_id).count_recursive(limit) + end + + def set_attribute_source(commit_id) + tree = get_tree(commit_id) + return if @attr_source == tree + + @attr_source = tree + attr_index = Rugged::Index.new + attr_index.read_tree(@attr_source) + @rugged.index = attr_index + end + + def load_attributes_for_path(path, attr_names) + @rugged.fetch_attributes(path, attr_names, GIT_ATTR_FLAGS) + end + + def load_blob(blob_id, max_size) + Rugged::Blob.to_buffer(@rugged, blob_id, max_size) + end + + def diff(old_commit, new_commit) + old_tree = old_commit.nil? ? nil : get_tree(old_commit) + new_tree = new_commit.nil? ? nil : get_tree(new_commit) + + Diff.new(Rugged::Tree.diff(@rugged, old_tree, new_tree)) + end + + # Internal: get the Rugged::Tree associated with a given commit ID. This + # method should not be used outside of Linguist itself and is subject to + # change or be removed. + # + # commit_id - the object ID of the commit whose tree instance we want. + # + # Returns the Rugged::Tree of the specified commit. + def get_tree(commit_id) + tree = @tree_map[commit_id] + return tree if tree + + @tree_map[commit_id] = Rugged::Commit.lookup(@rugged, commit_id).tree + @tree_map[commit_id] + end + + def method_missing(method_name, *args, &block) + @rugged.send(method_name, *args, &block) + end + end + end +end diff --git a/test/test_repository.rb b/test/test_repository.rb index 125f7a8a0c..81940566d9 100644 --- a/test/test_repository.rb +++ b/test/test_repository.rb @@ -1,16 +1,16 @@ require_relative "./helper" -class TestRepository < Minitest::Test - def rugged_repository - @rugged ||= Rugged::Repository.new(File.expand_path("../../.git", __FILE__)) - end - +class TestRuggedRepository < Minitest::Test def master_oid '7dbcffcf982e766fc711e633322de848f2b60ba5' end def linguist_repo(oid = master_oid) - Linguist::Repository.new(rugged_repository, oid) + Linguist::Repository.new(source_repository, oid) + end + + def source_repository + @rugged ||= Rugged::Repository.new(File.expand_path("../../.git", __FILE__)) end def test_linguist_language @@ -38,7 +38,7 @@ def test_incremental_stats assert old_repo.languages['Ruby'] > 10_000 assert old_repo.size > 30_000 - new_repo = Linguist::Repository.incremental(rugged_repository, master_oid, old_commit, old_repo.cache) + new_repo = Linguist::Repository.incremental(source_repository, master_oid, old_commit, old_repo.cache) assert new_repo.languages['Ruby'] > old_repo.languages['Ruby'] assert new_repo.size > old_repo.size @@ -88,16 +88,16 @@ def test_commit_with_git_attributes_data # With some .gitattributes data attr_commit = '7ee006cbcb2d7261f9e648510a684ee9ac64126b' # It's incremental but now is scanning more data and should bust the cache - new_repo = Linguist::Repository.incremental(rugged_repository, attr_commit, old_commit, old_repo.cache, 350_000) + new_repo = Linguist::Repository.incremental(source_repository, attr_commit, old_commit, old_repo.cache, 350_000) assert new_repo.breakdown_by_file["Java"].include?("lib/linguist.rb") end def test_linguist_override_vendored? attr_commit = '72a89fc9dcd3585250056ab591f9d7e2411d5fa1' - linguist_repo(attr_commit).read_index + linguist_repo(attr_commit).repository.set_attribute_source(attr_commit) - override_vendored = Linguist::LazyBlob.new(rugged_repository, attr_commit, 'Gemfile') + override_vendored = Linguist::LazyBlob.new(source_repository, attr_commit, 'Gemfile') # overridden .gitattributes assert override_vendored.vendored? @@ -105,12 +105,12 @@ def test_linguist_override_vendored? def test_linguist_override_unvendored? attr_commit = '01d6b9c637a7a6581fe456c600725b68f355b295' - linguist_repo(attr_commit).read_index + linguist_repo(attr_commit).repository.set_attribute_source(attr_commit) # lib/linguist/vendor.yml defines this as vendored. - override_unvendored = Linguist::LazyBlob.new(rugged_repository, attr_commit, 'test/fixtures/foo.rb') + override_unvendored = Linguist::LazyBlob.new(source_repository, attr_commit, 'test/fixtures/foo.rb') # test -linguist-vendored attribute method - override_unvendored_minus = Linguist::LazyBlob.new(rugged_repository, attr_commit, 'samples/CSS/bootstrap.css') + override_unvendored_minus = Linguist::LazyBlob.new(source_repository, attr_commit, 'samples/CSS/bootstrap.css') # overridden .gitattributes refute override_unvendored.vendored? @@ -119,12 +119,12 @@ def test_linguist_override_unvendored? def test_linguist_override_documentation? attr_commit = "01d6b9c637a7a6581fe456c600725b68f355b295" - linguist_repo(attr_commit).read_index + linguist_repo(attr_commit).repository.set_attribute_source(attr_commit) - readme = Linguist::LazyBlob.new(rugged_repository, attr_commit, "README.md") - arduino = Linguist::LazyBlob.new(rugged_repository, attr_commit, "samples/Arduino/hello.ino") + readme = Linguist::LazyBlob.new(source_repository, attr_commit, "README.md") + arduino = Linguist::LazyBlob.new(source_repository, attr_commit, "samples/Arduino/hello.ino") # test -linguist-documentation attribute method - minus = Linguist::LazyBlob.new(rugged_repository, attr_commit, "LICENSE") + minus = Linguist::LazyBlob.new(source_repository, attr_commit, "LICENSE") # overridden by .gitattributes refute_predicate readme, :documentation? @@ -134,11 +134,11 @@ def test_linguist_override_documentation? def test_linguist_override_generated? attr_commit = "01d6b9c637a7a6581fe456c600725b68f355b295" - linguist_repo(attr_commit).read_index + linguist_repo(attr_commit).repository.set_attribute_source(attr_commit) - rakefile = Linguist::LazyBlob.new(rugged_repository, attr_commit, "Rakefile") + rakefile = Linguist::LazyBlob.new(source_repository, attr_commit, "Rakefile") # test -linguist-generated attribute method - minus = Linguist::LazyBlob.new(rugged_repository, attr_commit, "samples/CSS/bootstrap.min.css") + minus = Linguist::LazyBlob.new(source_repository, attr_commit, "samples/CSS/bootstrap.min.css") # overridden .gitattributes assert rakefile.generated? refute minus.generated? @@ -146,16 +146,87 @@ def test_linguist_override_generated? def test_linguist_override_detectable? attr_commit = "01d6b9c637a7a6581fe456c600725b68f355b295" - linguist_repo(attr_commit).read_index + linguist_repo(attr_commit).repository.set_attribute_source(attr_commit) # markdown is overridden by .gitattributes to be detectable, html to not be detectable - markdown = Linguist::LazyBlob.new(rugged_repository, attr_commit, "samples/Markdown/tender.md") - html = Linguist::LazyBlob.new(rugged_repository, attr_commit, "samples/HTML/pages.html") + markdown = Linguist::LazyBlob.new(source_repository, attr_commit, "samples/Markdown/tender.md") + html = Linguist::LazyBlob.new(source_repository, attr_commit, "samples/HTML/pages.html") # test -linguist-detectable attribute method - minus = Linguist::LazyBlob.new(rugged_repository, attr_commit, "samples/CoffeeScript/browser.coffee") + minus = Linguist::LazyBlob.new(source_repository, attr_commit, "samples/CoffeeScript/browser.coffee") assert_predicate markdown, :detectable? refute_predicate html, :detectable? refute_predicate minus, :detectable? end + + def test_read_index + attr_commit = '72a89fc9dcd3585250056ab591f9d7e2411d5fa1' + repo = linguist_repo(attr_commit) + repo.read_index + + expected_tree = '9dd86972f2d3caa295588b329f9f195bcb409204' + assert_equal expected_tree, @rugged.index.write_tree + end + + def test_current_tree + repo = linguist_repo + + expected_tree = 'f6cb65aeaee0b206b961746175ecaf4449f73c56' + assert_equal expected_tree, repo.current_tree.oid + end +end + +################################################################################ + +class TestEmptyRepository < Minitest::Test + def source_repository + @source ||= EmptyRepository.new + end + + def linguist_repo + Linguist::Repository.new(source_repository, "1234567890123456789012345678901234567890") + end + + def test_linguist_language + assert_nil linguist_repo.language + end + + def test_linguist_size + assert_equal 0, linguist_repo.size + end + + def test_read_index_raises_error + assert_raises(NotImplementedError) { linguist_repo.read_index } + end + + def test_current_tree_raises_error + assert_raises(NotImplementedError) { linguist_repo.current_tree } + end +end + +class EmptyRepository < Linguist::Source::Repository + class Diff < Linguist::Source::Diff + def each_delta(&block) + [].each(&block) + end + end + + def get_tree_size(commit_id, limit) + 0 + end + + def set_attribute_source(commit_id) + end + + def load_attributes_for_path(path, attr_names) + {} + end + + def load_blob(blob_id, max_size) + ["", 0] + end + + def diff(old_commit, new_commit) + Diff.new + end end From 120e0e56af30bd7a64a3a126ea122de477d1ada8 Mon Sep 17 00:00:00 2001 From: Novus Nota <68142933+novusnota@users.noreply.github.com> Date: Mon, 25 Nov 2024 16:58:14 +0100 Subject: [PATCH 22/22] Add language: `Tact`, and extension to `JSON` (#6689) * Add language: `Tact` * fix: Heuristics and samples for JSON .tact format * chore: update submodule for the latest version of grammar * chore: correct the regex in heuristics * chore: change source from `tact-vscode` to `tact-sublime` --- .gitmodules | 3 + grammars.yml | 2 + lib/linguist/heuristics.yml | 5 + lib/linguist/languages.yml | 9 + samples/JSON/landing.tact | 1 + samples/Tact/deployable_counter.tact | 20 ++ samples/Tact/jetton.tact | 339 ++++++++++++++++++ test/test_heuristics.rb | 7 + vendor/README.md | 1 + vendor/grammars/tact-sublime | 1 + .../git_submodule/tact-sublime.dep.yml | 33 ++ 11 files changed, 421 insertions(+) create mode 100644 samples/JSON/landing.tact create mode 100644 samples/Tact/deployable_counter.tact create mode 100644 samples/Tact/jetton.tact create mode 160000 vendor/grammars/tact-sublime create mode 100644 vendor/licenses/git_submodule/tact-sublime.dep.yml diff --git a/.gitmodules b/.gitmodules index d6cc3c9f78..17730073a7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1217,6 +1217,9 @@ [submodule "vendor/grammars/syntax-mcfunction"] path = vendor/grammars/syntax-mcfunction url = https://github.com/MinecraftCommands/syntax-mcfunction.git +[submodule "vendor/grammars/tact-sublime"] + path = vendor/grammars/tact-sublime + url = https://github.com/tact-lang/tact-sublime.git [submodule "vendor/grammars/tcl.tmbundle"] path = vendor/grammars/tcl.tmbundle url = https://github.com/textmate/tcl.tmbundle diff --git a/grammars.yml b/grammars.yml index 26858883ef..ee3c7bdc3b 100644 --- a/grammars.yml +++ b/grammars.yml @@ -1089,6 +1089,8 @@ vendor/grammars/syntax: - source.sentinel vendor/grammars/syntax-mcfunction: - source.mcfunction +vendor/grammars/tact-sublime: +- source.tact vendor/grammars/tcl.tmbundle: - source.tcl - text.html.tcl diff --git a/lib/linguist/heuristics.yml b/lib/linguist/heuristics.yml index d5c20038f9..00e7f53b8d 100644 --- a/lib/linguist/heuristics.yml +++ b/lib/linguist/heuristics.yml @@ -751,6 +751,11 @@ disambiguations: pattern: '^\s*(?:use\s+v6\b|\bmodule\b|\bmy\s+class\b)' - language: Turing pattern: '^\s*%[ \t]+|^\s*var\s+\w+(\s*:\s*\w+)?\s*:=\s*\w+' +- extensions: ['.tact'] + rules: + - language: JSON + pattern: '\A\s*\{\"' + - language: Tact - extensions: ['.tag'] rules: - language: Java Server Pages diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index ddf7c45e06..a8fd524980 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -3286,6 +3286,7 @@ JSON: - ".jsonl" - ".mcmeta" - ".sarif" + - ".tact" - ".tfstate" - ".tfstate.backup" - ".topojson" @@ -7244,6 +7245,14 @@ TXL: tm_scope: source.txl ace_mode: text language_id: 366 +Tact: + type: programming + color: "#48b5ff" + extensions: + - ".tact" + ace_mode: text + tm_scope: source.tact + language_id: 606708469 Talon: type: programming ace_mode: text diff --git a/samples/JSON/landing.tact b/samples/JSON/landing.tact new file mode 100644 index 0000000000..193d5dc9a4 --- /dev/null +++ b/samples/JSON/landing.tact @@ -0,0 +1 @@ +{"project":{"createdAt":1629543532823,"description":"","layout":{"layouts":{"VestBack":[{"index":0,"x":0,"y":0},{"index":1,"x":0.333,"y":0},{"index":2,"x":0.667,"y":0},{"index":3,"x":1,"y":0},{"index":4,"x":0,"y":0.25},{"index":5,"x":0.333,"y":0.25},{"index":6,"x":0.667,"y":0.25},{"index":7,"x":1,"y":0.25},{"index":8,"x":0,"y":0.5},{"index":9,"x":0.333,"y":0.5},{"index":10,"x":0.667,"y":0.5},{"index":11,"x":1,"y":0.5},{"index":12,"x":0,"y":0.75},{"index":13,"x":0.333,"y":0.75},{"index":14,"x":0.667,"y":0.75},{"index":15,"x":1,"y":0.75},{"index":16,"x":0,"y":1},{"index":17,"x":0.333,"y":1},{"index":18,"x":0.667,"y":1},{"index":19,"x":1,"y":1}],"VestFront":[{"index":0,"x":0,"y":0},{"index":1,"x":0.333,"y":0},{"index":2,"x":0.667,"y":0},{"index":3,"x":1,"y":0},{"index":4,"x":0,"y":0.25},{"index":5,"x":0.333,"y":0.25},{"index":6,"x":0.667,"y":0.25},{"index":7,"x":1,"y":0.25},{"index":8,"x":0,"y":0.5},{"index":9,"x":0.333,"y":0.5},{"index":10,"x":0.667,"y":0.5},{"index":11,"x":1,"y":0.5},{"index":12,"x":0,"y":0.75},{"index":13,"x":0.333,"y":0.75},{"index":14,"x":0.667,"y":0.75},{"index":15,"x":1,"y":0.75},{"index":16,"x":0,"y":1},{"index":17,"x":0.333,"y":1},{"index":18,"x":0.667,"y":1},{"index":19,"x":1,"y":1}]},"name":"Tactot","type":"Tactot"},"mediaFileDuration":3,"name":"landing","tracks":[{"effects":[{"modes":{"VestBack":{"dotMode":{"dotConnected":false,"feedback":[{"endTime":300,"playbackType":"NONE","startTime":0,"pointList":[]}]},"mode":"PATH_MODE","pathMode":{"feedback":[{"movingPattern":"CONST_SPEED","playbackType":"FADE_OUT","pointList":[{"intensity":0.7,"time":0,"x":0,"y":1},{"intensity":0.7,"time":300,"x":0,"y":0}],"visible":true},{"movingPattern":"CONST_SPEED","playbackType":"FADE_OUT","pointList":[{"intensity":0.7,"time":0,"x":0.33,"y":1},{"intensity":0.7,"time":300,"x":0.34,"y":0}],"visible":true},{"movingPattern":"CONST_SPEED","playbackType":"FADE_OUT","pointList":[{"intensity":0.7,"time":0,"x":0.67,"y":1},{"intensity":0.7,"time":300,"x":0.67,"y":0}],"visible":true},{"movingPattern":"CONST_SPEED","playbackType":"FADE_OUT","pointList":[{"intensity":0.7,"time":0,"x":1,"y":1},{"intensity":0.7,"time":300,"x":1,"y":0}],"visible":true},{"movingPattern":"CONST_SPEED","playbackType":"NONE","pointList":[{"intensity":0.7,"time":0,"x":0,"y":1},{"intensity":0.7,"time":73,"x":0.33,"y":0.76},{"intensity":0.7,"time":150,"x":0,"y":0.48},{"intensity":0.7,"time":223,"x":0.34,"y":0.25},{"intensity":0.7,"time":300,"x":0,"y":0}],"visible":true},{"movingPattern":"CONST_SPEED","playbackType":"NONE","pointList":[{"intensity":0.7,"time":0,"x":1,"y":1},{"intensity":0.7,"time":74,"x":0.67,"y":0.75},{"intensity":0.7,"time":148,"x":1,"y":0.5},{"intensity":0.7,"time":223,"x":0.66,"y":0.25},{"intensity":0.7,"time":300,"x":1,"y":0}],"visible":true}]}},"VestFront":{"dotMode":{"dotConnected":false,"feedback":[{"endTime":300,"playbackType":"NONE","startTime":0,"pointList":[]}]},"mode":"PATH_MODE","pathMode":{"feedback":[{"movingPattern":"CONST_SPEED","playbackType":"FADE_OUT","pointList":[{"intensity":0.7,"time":0,"x":0,"y":1},{"intensity":0.7,"time":300,"x":0,"y":0}],"visible":true},{"movingPattern":"CONST_SPEED","playbackType":"FADE_OUT","pointList":[{"intensity":0.7,"time":0,"x":0.33,"y":1},{"intensity":0.7,"time":300,"x":0.34,"y":0}],"visible":true},{"movingPattern":"CONST_SPEED","playbackType":"FADE_OUT","pointList":[{"intensity":0.7,"time":0,"x":0.67,"y":1},{"intensity":0.7,"time":300,"x":0.67,"y":0}],"visible":true},{"movingPattern":"CONST_SPEED","playbackType":"FADE_OUT","pointList":[{"intensity":0.7,"time":0,"x":1,"y":1},{"intensity":0.7,"time":300,"x":1,"y":0}],"visible":true},{"movingPattern":"CONST_SPEED","playbackType":"NONE","pointList":[{"intensity":0.7,"time":0,"x":0,"y":1},{"intensity":0.7,"time":73,"x":0.33,"y":0.76},{"intensity":0.7,"time":150,"x":0,"y":0.48},{"intensity":0.7,"time":223,"x":0.34,"y":0.25},{"intensity":0.7,"time":300,"x":0,"y":0}],"visible":true},{"movingPattern":"CONST_SPEED","playbackType":"NONE","pointList":[{"intensity":0.7,"time":0,"x":1,"y":1},{"intensity":0.7,"time":74,"x":0.67,"y":0.75},{"intensity":0.7,"time":148,"x":1,"y":0.5},{"intensity":0.7,"time":223,"x":0.66,"y":0.25},{"intensity":0.7,"time":300,"x":1,"y":0}],"visible":true}]}}},"name":"Effect 1","offsetTime":300,"startTime":550}],"enable":true},{"enable":true,"effects":[]}],"updatedAt":1630238182973},"durationMillis":0,"intervalMillis":20,"size":20} diff --git a/samples/Tact/deployable_counter.tact b/samples/Tact/deployable_counter.tact new file mode 100644 index 0000000000..7a17e4ba7d --- /dev/null +++ b/samples/Tact/deployable_counter.tact @@ -0,0 +1,20 @@ +// this trait has to be imported +import "@stdlib/deploy"; + +// the Deployable trait adds a default receiver for the "Deploy" message +contract Counter with Deployable { + + val: Int as uint32; + + init() { + self.val = 0; + } + + receive("increment") { + self.val = self.val + 1; + } + + get fun value(): Int { + return self.val; + } +} diff --git a/samples/Tact/jetton.tact b/samples/Tact/jetton.tact new file mode 100644 index 0000000000..04b7ecdecc --- /dev/null +++ b/samples/Tact/jetton.tact @@ -0,0 +1,339 @@ +import "@stdlib/ownable"; + +message Mint { + amount: Int; + receiver: Address; +} + +contract SampleJetton with Jetton { + totalSupply: Int as coins; + owner: Address; + content: Cell; + mintable: Bool; + + max_supply: Int as coins; + + init(owner: Address, content: Cell, max_supply: Int) { + self.totalSupply = 0; + self.owner = owner; + self.mintable = true; + self.content = content; + + self.max_supply = max_supply; // Initial Setting for max_supply + } + + receive(msg: Mint) { + let ctx: Context = context(); + require(ctx.sender == self.owner, "Not Owner"); + require(self.mintable, "Can't Mint Anymore"); + self.mint(msg.receiver, msg.amount, self.owner); // (to, amount, response_destination) + } + + receive("Mint: 100") { // Public Minting + let ctx: Context = context(); + require(self.mintable, "Can't Mint Anymore"); + self.mint(ctx.sender, 100, self.owner); + } + + receive("Owner: MintClose") { + let ctx: Context = context(); + require(ctx.sender == self.owner, "Not Owner"); + self.mintable = false; + } +} + +struct JettonData { + totalSupply: Int; + mintable: Bool; + owner: Address; + content: Cell; + walletCode: Cell; +} + +// ============================================================================================================ // +@interface("org.ton.jetton.master") +trait Jetton with Ownable { + + totalSupply: Int; // Already set initially + mintable: Bool; + owner: Address; + content: Cell; + + max_supply: Int; // This is not in the TEP-74 interface + + receive(msg: TokenUpdateContent) { + self.requireOwner(); // Allow changing content only by owner + self.content = msg.content; // Update content + } + + receive(msg: TokenBurnNotification) { + self.requireWallet(msg.owner); // Check wallet + self.totalSupply = self.totalSupply - msg.amount; // Update supply + + if (msg.response_destination != null) { // Cashback + send(SendParameters{ + to: msg.response_destination!!, + value: 0, + bounce: false, + mode: SendRemainingValue + SendIgnoreErrors, + body: TokenExcesses{ + queryId: msg.queryId + }.toCell() + }); + } + } + + // @to The Address receive the Jetton token after minting + // @amount The amount of Jetton token being minted + // @response_destination The previous owner address + fun mint(to: Address, amount: Int, response_destination: Address) { + require(self.totalSupply + amount <= self.max_supply, "The total supply will be overlapping."); + self.totalSupply = self.totalSupply + amount; // Update total supply + + let winit: StateInit = self.getJettonWalletInit(to); // Create message + send(SendParameters{ + to: contractAddress(winit), + value: 0, + bounce: false, + mode: SendRemainingValue, + body: TokenTransferInternal{ + queryId: 0, + amount: amount, + from: myAddress(), + response_destination: response_destination, + forward_ton_amount: 0, + forward_payload: emptySlice() + }.toCell(), + code: winit.code, + data: winit.data + }); + } + + fun requireWallet(owner: Address) { + let ctx: Context = context(); + let winit: StateInit = self.getJettonWalletInit(owner); + require(contractAddress(winit) == ctx.sender, "Invalid sender"); + } + + virtual fun getJettonWalletInit(address: Address): StateInit { + return initOf JettonDefaultWallet(myAddress(), address); + } + + // ====== Get Methods ====== // + get fun get_jetton_data(): JettonData { + let code: Cell = self.getJettonWalletInit(myAddress()).code; + return JettonData{ + totalSupply: self.totalSupply, + mintable: self.mintable, + owner: self.owner, + content: self.content, + walletCode: code + }; + } + + get fun get_wallet_address(owner: Address): Address { + let winit: StateInit = self.getJettonWalletInit(owner); + return contractAddress(winit); + } +} +// ============================================================ // +@interface("org.ton.jetton.wallet") +contract JettonDefaultWallet { + const minTonsForStorage: Int = ton("0.01"); + const gasConsumption: Int = ton("0.01"); + + balance: Int; + owner: Address; + master: Address; + + init(master: Address, owner: Address) { + self.balance = 0; + self.owner = owner; + self.master = master; + } + + receive(msg: TokenTransfer) { // 0xf8a7ea5 + let ctx: Context = context(); // Check sender + require(ctx.sender == self.owner, "Invalid sender"); + + // Gas checks + let fwdFee: Int = ctx.readForwardFee() + ctx.readForwardFee(); + let final: Int = 2 * self.gasConsumption + self.minTonsForStorage + fwdFee; + require(ctx.value > min(final, ton("0.01")), "Invalid value!!"); + + // Update balance + self.balance = self.balance - msg.amount; + require(self.balance >= 0, "Invalid balance"); + + let init: StateInit = initOf JettonDefaultWallet(self.master, msg.destination); + let walletAddress: Address = contractAddress(init); + send(SendParameters{ + to: walletAddress, + value: 0, + mode: SendRemainingValue, + bounce: false, + body: TokenTransferInternal{ + queryId: msg.queryId, + amount: msg.amount, + from: self.owner, + response_destination: msg.response_destination, + forward_ton_amount: msg.forward_ton_amount, + forward_payload: msg.forward_payload + }.toCell(), + code: init.code, + data: init.data + }); + } + + receive(msg: TokenTransferInternal) { // 0x178d4519 + let ctx: Context = context(); + + if (ctx.sender != self.master) { + let sinit: StateInit = initOf JettonDefaultWallet(self.master, msg.from); + require(contractAddress(sinit) == ctx.sender, "Invalid sender!"); + } + + // Update balance + self.balance = self.balance + msg.amount; + require(self.balance >= 0, "Invalid balance"); + + // Get value for gas + let msgValue: Int = self.msgValue(ctx.value); + let fwdFee: Int = ctx.readForwardFee(); + msgValue = msgValue - msg.forward_ton_amount - fwdFee; + + // 0x7362d09c - notify the new owner of JettonToken that the transfer is complete + if (msg.forward_ton_amount > 0) { + send(SendParameters{ + to: self.owner, + value: msg.forward_ton_amount, + mode: SendPayGasSeparately + SendIgnoreErrors, + bounce: false, + body: TokenNotification { + queryId: msg.queryId, + amount: msg.amount, + from: msg.from, + forward_payload: msg.forward_payload + }.toCell() + }); + } + + // 0xd53276db -- Cashback to the original Sender + if (msg.response_destination != null) { + send(SendParameters { + to: msg.response_destination, + value: msgValue, + bounce: false, + body: TokenExcesses { + queryId: msg.queryId + }.toCell(), + mode: SendIgnoreErrors + }); + } + } + + receive(msg: TokenBurn) { + let ctx: Context = context(); + require(ctx.sender == self.owner, "Invalid sender"); // Check sender + + self.balance = self.balance - msg.amount; // Update balance + require(self.balance >= 0, "Invalid balance"); + + let fwdFee: Int = ctx.readForwardFee(); // Gas checks + require(ctx.value > fwdFee + 2 * self.gasConsumption + self.minTonsForStorage, "Invalid value - Burn"); + + // Burn tokens + send(SendParameters{ + to: self.master, + value: 0, + mode: SendRemainingValue, + bounce: true, + body: TokenBurnNotification{ + queryId: msg.queryId, + amount: msg.amount, + owner: self.owner, + response_destination: self.owner + }.toCell() + }); + } + + get fun msgValue(value: Int): Int { + let msgValue: Int = value; + let tonBalanceBeforeMsg: Int = myBalance() - msgValue; + let storageFee: Int = self.minTonsForStorage - min(tonBalanceBeforeMsg, self.minTonsForStorage); + msgValue = msgValue - (storageFee + self.gasConsumption); + return msgValue; + } + + bounced(src: bounced) { + self.balance = self.balance + src.amount; + } + + bounced(src: bounced) { + self.balance = self.balance + src.amount; + } + + get fun get_wallet_data(): JettonWalletData { + return JettonWalletData{ + balance: self.balance, + owner: self.owner, + master: self.master, + walletCode: (initOf JettonDefaultWallet(self.master, self.owner)).code + }; + } +} + +struct JettonWalletData { + balance: Int; + owner: Address; + master: Address; + walletCode: Cell; +} + +message(0xf8a7ea5) TokenTransfer { + queryId: Int as uint64; + amount: Int as coins; + destination: Address; + response_destination: Address; + custom_payload: Cell?; + forward_ton_amount: Int as coins; + forward_payload: Slice as remaining; // Comment Text message when Transfer the jetton +} + +message(0x178d4519) TokenTransferInternal { + queryId: Int as uint64; + amount: Int as coins; + from: Address; + response_destination: Address; + forward_ton_amount: Int as coins; + forward_payload: Slice as remaining; // Comment Text message when Transfer the jetton +} + +message(0x7362d09c) TokenNotification { + queryId: Int as uint64; + amount: Int as coins; + from: Address; + forward_payload: Slice as remaining; // Comment Text message when Transfer the jetton +} + +message(0x595f07bc) TokenBurn { + queryId: Int as uint64; + amount: Int as coins; + owner: Address; + response_destination: Address; +} + +message(0x7bdd97de) TokenBurnNotification { + queryId: Int as uint64; + amount: Int as coins; + owner: Address; + response_destination: Address?; +} + +message(0xd53276db) TokenExcesses { + queryId: Int as uint64; +} + +message TokenUpdateContent { + content: Cell; +} diff --git a/test/test_heuristics.rb b/test/test_heuristics.rb index 3aa803f895..b585ac74cf 100755 --- a/test/test_heuristics.rb +++ b/test/test_heuristics.rb @@ -996,6 +996,13 @@ def test_t_by_heuristics }) end + def test_tact_by_heuristics + assert_heuristics({ + "Tact" => all_fixtures("Tact", "*.tact"), + "JSON" => all_fixtures("JSON", "*.tact"), + }) + end + def test_tag_by_heuristics assert_heuristics({ "Java Server Pages" => Dir.glob("#{fixtures_path}/Generic/tag/Java Server Pages/*"), diff --git a/vendor/README.md b/vendor/README.md index ae93beb16e..d66d7e3751 100644 --- a/vendor/README.md +++ b/vendor/README.md @@ -574,6 +574,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting - **TSV:** [Alhadis/language-etc](https://github.com/Alhadis/language-etc) - **TSX:** [Microsoft/TypeScript-TmLanguage](https://github.com/Microsoft/TypeScript-TmLanguage) - **TXL:** [MikeHoffert/Sublime-Text-TXL-syntax](https://github.com/MikeHoffert/Sublime-Text-TXL-syntax) +- **Tact:** [tact-lang/tact-sublime](https://github.com/tact-lang/tact-sublime) - **Talon:** [mrob95/vscode-TalonScript](https://github.com/mrob95/vscode-TalonScript) - **Tcl:** [textmate/tcl.tmbundle](https://github.com/textmate/tcl.tmbundle) - **Tcsh:** [atom/language-shellscript](https://github.com/atom/language-shellscript) diff --git a/vendor/grammars/tact-sublime b/vendor/grammars/tact-sublime new file mode 160000 index 0000000000..3b63bdf414 --- /dev/null +++ b/vendor/grammars/tact-sublime @@ -0,0 +1 @@ +Subproject commit 3b63bdf414775b9755197c5c9ca5baf82b3bafd1 diff --git a/vendor/licenses/git_submodule/tact-sublime.dep.yml b/vendor/licenses/git_submodule/tact-sublime.dep.yml new file mode 100644 index 0000000000..fa3b513a0a --- /dev/null +++ b/vendor/licenses/git_submodule/tact-sublime.dep.yml @@ -0,0 +1,33 @@ +--- +name: tact-sublime +version: 3b63bdf414775b9755197c5c9ca5baf82b3bafd1 +type: git_submodule +homepage: https://github.com/tact-lang/tact-sublime.git +license: mit +licenses: +- sources: LICENSE + text: | + MIT License + + Copyright (c) 2024 Novus Nota + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +- sources: README.md + text: "[MIT](LICENSE) © [Novus Nota](https://github.com/novusnota)." +notices: []