Socket
Socket
Sign inDemoInstall

vscode-tmgrammar-test

Package Overview
Dependencies
23
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.2 to 0.1.3

2

dist/common/index.js

@@ -110,3 +110,3 @@ "use strict";

let langToScope = Object.assign({}, ...grammars.filter((x) => x.language).map((x) => ({ [x.language || '']: x.scopeName })));
let extToLang = Object.assign({}, ...ys.map((x) => x.extensions.map((e) => ({ [e]: x.id }))).flat());
let extToLang = Object.assign({}, ...ys.map((x) => (x.extensions || []).map((e) => ({ [e]: x.id }))).flat());
extensionToScope = (ext) => scope || langToScope[extToLang[ext]];

@@ -113,0 +113,0 @@ }

@@ -40,2 +40,3 @@ #!/usr/bin/env node

const path = __importStar(require("path"));
const bottleneck_1 = __importDefault(require("bottleneck"));
let packageJson = require('../package.json');

@@ -81,2 +82,6 @@ commander_1.program

let { grammars, extensionToScope } = (0, index_1.loadConfiguration)(options.config, options.scope, options.grammar);
const limiter = new bottleneck_1.default({
maxConcurrent: 8,
minTime: 0
});
const registry = (0, index_1.createRegistry)(grammars);

@@ -91,3 +96,3 @@ const testResults = Promise.all(testCases.map((filename) => {

}
return (0, index_2.getVSCodeTokens)(registry, scope, src)
return limiter.schedule(() => (0, index_2.getVSCodeTokens)(registry, scope, src))
.then((tokens) => {

@@ -94,0 +99,0 @@ if (fs.existsSync(filename + '.snap')) {

@@ -34,2 +34,3 @@ #!/usr/bin/env node

const glob_1 = __importDefault(require("glob"));
const bottleneck_1 = __importDefault(require("bottleneck"));
const index_1 = require("./unit/index");

@@ -78,2 +79,6 @@ const reporter_1 = require("./unit/reporter");

}
const limiter = new bottleneck_1.default({
maxConcurrent: 8,
minTime: 0
});
const testResults = Promise.all(rawTestCases.map((filename) => {

@@ -91,3 +96,3 @@ let tc = undefined;

let testCase = tc;
return (0, index_1.runGrammarTestCase)(registry, testCase)
return limiter.schedule(() => (0, index_1.runGrammarTestCase)(registry, testCase))
.then((failures) => {

@@ -94,0 +99,0 @@ reporter.reportTestResult(filename, testCase, failures);

{
"name": "vscode-tmgrammar-test",
"version": "0.1.2",
"version": "0.1.3",
"description": "Test runner for VSCode textmate grammars",

@@ -52,2 +52,3 @@ "homepage": "https://github.com/PanAeon/vscode-tmgrammar-test",

"dependencies": {
"bottleneck": "^2.19.5",
"chalk": "^2.4.2",

@@ -54,0 +55,0 @@ "commander": "^9.2.0",

@@ -90,3 +90,3 @@ ![Node.js CI](https://img.shields.io/github/actions/workflow/status/PanAeon/vscode-tmgrammar-test/nodejs.yml?branch=master&style=for-the-badge) ![NPM Version](https://img.shields.io/npm/v/vscode-tmgrammar-test?style=for-the-badge)

```bash
vscode-tmgrammar-test 'tests/unit/**/*.test.scala'
vscode-tmgrammar-test 'tests/unit/**/*.test.scala'
```

@@ -198,15 +198,16 @@

```json
{
{
"label": "Run tests",
"type": "shell",
"command": "vscode-tmgrammar-test -c -g testcase/dhall.tmLanguage.json \"**/*.dhall\"",
"command": "vscode-tmgrammar-test -c -g testcase/dhall.tmLanguage.json '**/*.dhall'",
"group": "test",
"presentation": {
"reveal": "always",
"panel":"new"
"panel":"new",
},
"problemMatcher": {
"owner": "vscode-tmgrammar-test",
"fileLocation": [
"relative",
"${workspaceFolder}"
"${workspaceFolder}",
],

@@ -221,8 +222,7 @@ "pattern": [

"endColumn": 5,
"message": 6
}
]
}
}
"message": 6,
},
],
},
},
```

@@ -229,0 +229,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc