jasmine-ts
Advanced tools
Comparing version 0.3.0 to 0.3.2
#!/usr/bin/env node | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const fs = require("fs"); | ||
const path = require("path"); | ||
const dist_1 = require("ts-node/dist"); | ||
const ts_node_1 = require("ts-node"); | ||
const yargs_1 = require("yargs"); | ||
@@ -21,2 +20,4 @@ const TS_NODE_OPTIONS = [ | ||
"compilerOptions", | ||
"transpileOnly", | ||
"typeCheck", | ||
]; | ||
@@ -26,7 +27,7 @@ const tsNodeOptions = Object.assign({}, ...TS_NODE_OPTIONS.map((option) => { | ||
return (option === "compilerOptions") | ||
? { compilerOptions: dist_1.parse(yargs_1.argv[option]) } | ||
? { compilerOptions: ts_node_1.parse(yargs_1.argv[option]) } | ||
: { [option]: yargs_1.argv[option] }; | ||
} | ||
})); | ||
dist_1.register(tsNodeOptions); | ||
ts_node_1.register(tsNodeOptions); | ||
const Jasmine = require("jasmine"); | ||
@@ -37,26 +38,21 @@ const Command = require("jasmine/lib/command"); | ||
const command = new Command(path.resolve(), examplesDir, console.log); | ||
const configPath = yargs_1.argv.config || process.env.JASMINE_CONFIG_PATH || "spec/support/jasmine.json"; | ||
const initReporters = (config) => { | ||
if (config.reporters && config.reporters.length > 0) { | ||
jasmine.env.clearReporters(); | ||
config.reporters.forEach((reporter) => { | ||
const parts = reporter.name.split("#"); | ||
const name = parts[0]; | ||
const member = parts[1]; | ||
const reporterClass = member ? require(name)[member] : require(name); | ||
jasmine.addReporter(new (reporterClass)(reporter.options)); | ||
}); | ||
} | ||
}; | ||
let configJSON = ""; | ||
try { | ||
configJSON = fs.readFileSync(path.resolve(configPath), "utf8"); | ||
const JASMINE_OPTIONS = [ | ||
'--no-color', | ||
'--color', | ||
'--filter=', | ||
'--helper=', | ||
'--require=', | ||
'--stop-on-failure=', | ||
'--fail-fast=', | ||
'--config=', | ||
'--reporter=' | ||
]; | ||
function jasmineOptionsFilter(argOption) { | ||
return JASMINE_OPTIONS.some(option => argOption.startsWith(option)) | ||
|| !argOption.startsWith('--'); | ||
} | ||
catch (e) { } | ||
if (configJSON) { | ||
const config = JSON.parse(configJSON); | ||
initReporters(config); | ||
} | ||
const commandOptions = process.argv.slice(2).filter((option) => option.indexOf(configPath) >= 0); | ||
const commandOptions = process.argv | ||
.slice(2) | ||
.filter(jasmineOptionsFilter); | ||
command.run(jasmine, commandOptions); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "jasmine-ts", | ||
"version": "0.3.0", | ||
"version": "0.3.2", | ||
"description": "Execute jasmine with ts-node", | ||
@@ -8,4 +8,9 @@ "main": "lib/index.js", | ||
"scripts": { | ||
"test": "./node_modules/.bin/tslint index.ts && tsc && node lib/index.js --config=spec/jasmine.json spec/jasmine-ts.spec.ts --compilerOptions='{\"allowJs\": true}'", | ||
"prepublishOnly": "tsc" | ||
"precompile": "rimraf lib", | ||
"compile": "tsc --project tsconfig.json", | ||
"lint": "tslint -p tsconfig.json", | ||
"jasmineTs": "node lib/index.js --config=spec/jasmine.json spec/jasmine-ts.spec.ts --transpileOnly --compilerOptions='{\"allowJs\": true}' --fake-option", | ||
"test": "npm run lint && npm run compile && npm run jasmineTs", | ||
"prepublishOnly": "npm run compile", | ||
"release": "standard-version" | ||
}, | ||
@@ -24,2 +29,5 @@ "repository": { | ||
"author": "Sven Reglitzki <sreglitzki@gmail.com>", | ||
"maintainers": [ | ||
"Róbert Kiss <ert78gb@gmail.com>" | ||
], | ||
"license": "MIT", | ||
@@ -30,23 +38,25 @@ "bugs": { | ||
"homepage": "https://github.com/svi3c/jasmine-ts#readme", | ||
"files": [ | ||
"lib" | ||
], | ||
"dependencies": { | ||
"yargs": "^8.0.2" | ||
"yargs": "^16.2.0" | ||
}, | ||
"peerDependencies": { | ||
"jasmine": ">= 2.0", | ||
"ts-node": ">=3.2.0 <8", | ||
"typescript": ">=2.4.1" | ||
"jasmine": ">=3.4", | ||
"ts-node": ">=3.2.0 <=10", | ||
"typescript": ">=3.5.2" | ||
}, | ||
"devDependencies": { | ||
"@types/jasmine": "^2.5.53", | ||
"@types/node": "^8.0.12", | ||
"@types/yargs": "^8.0.1", | ||
"jasmine": ">= 2.0", | ||
"jasmine-spec-reporter": "^4.1.1", | ||
"ts-node": ">=3.2.0 <8", | ||
"tslint": "^5.5.0", | ||
"typescript": ">=2.4.1" | ||
}, | ||
"engines": { | ||
"node": ">= 5.12" | ||
"@types/jasmine": "^3.6.3", | ||
"@types/node": "^14.14.25", | ||
"@types/yargs": "^16.0.0", | ||
"jasmine": "^3.6.4", | ||
"jasmine-spec-reporter": "^6.0.0", | ||
"rimraf": "^3.0.2", | ||
"standard-version": "^9.1.0", | ||
"ts-node": "^9.1.1", | ||
"tslint": "^6.1.3", | ||
"typescript": "^4.1.3" | ||
} | ||
} |
# jasmine-ts | ||
[![Build Status](https://travis-ci.org/svi3c/jasmine-ts.svg?branch=master)](https://travis-ci.org/svi3c/jasmine-ts) | ||
![CI](https://github.com/svi3c/jasmine-ts/workflows/Node.js%20CI/badge.svg) | ||
@@ -5,0 +5,0 @@ A simplification for running [jasmine](https://www.npmjs.com/package/jasmine) with |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
0
9963
10
6
54
1
+ Added@cspotcode/source-map-support@0.8.1(transitive)
+ Added@jridgewell/resolve-uri@3.1.2(transitive)
+ Added@jridgewell/sourcemap-codec@1.5.0(transitive)
+ Added@jridgewell/trace-mapping@0.3.9(transitive)
+ Added@tsconfig/node10@1.0.11(transitive)
+ Added@tsconfig/node12@1.0.11(transitive)
+ Added@tsconfig/node14@1.0.3(transitive)
+ Added@tsconfig/node16@1.0.4(transitive)
+ Added@types/node@22.10.7(transitive)
+ Addedacorn@8.14.0(transitive)
+ Addedacorn-walk@8.3.4(transitive)
+ Addedarg@4.1.3(transitive)
+ Addedcliui@7.0.4(transitive)
+ Addedcreate-require@1.1.1(transitive)
+ Addeddiff@4.0.2(transitive)
+ Addedescalade@3.2.0(transitive)
+ Addedget-caller-file@2.0.5(transitive)
+ Addedts-node@10.9.2(transitive)
+ Addedundici-types@6.20.0(transitive)
+ Addedv8-compile-cache-lib@3.0.1(transitive)
+ Addedy18n@5.0.8(transitive)
+ Addedyargs@16.2.0(transitive)
+ Addedyargs-parser@20.2.9(transitive)
+ Addedyn@3.1.1(transitive)
- Removedansi-regex@2.1.13.0.1(transitive)
- Removedarrify@1.0.1(transitive)
- Removedbuffer-from@1.1.2(transitive)
- Removedcamelcase@4.1.0(transitive)
- Removedcliui@3.2.0(transitive)
- Removedcode-point-at@1.1.0(transitive)
- Removedcross-spawn@5.1.0(transitive)
- Removeddecamelize@1.2.0(transitive)
- Removeddiff@3.5.0(transitive)
- Removederror-ex@1.3.2(transitive)
- Removedexeca@0.7.0(transitive)
- Removedfind-up@2.1.0(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedget-caller-file@1.0.3(transitive)
- Removedget-stream@3.0.0(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removedhasown@2.0.2(transitive)
- Removedhosted-git-info@2.8.9(transitive)
- Removedinvert-kv@1.0.0(transitive)
- Removedis-arrayish@0.2.1(transitive)
- Removedis-core-module@2.16.1(transitive)
- Removedis-fullwidth-code-point@1.0.02.0.0(transitive)
- Removedis-stream@1.1.0(transitive)
- Removedlcid@1.0.0(transitive)
- Removedload-json-file@2.0.0(transitive)
- Removedlocate-path@2.0.0(transitive)
- Removedlru-cache@4.1.5(transitive)
- Removedmem@1.1.0(transitive)
- Removedmimic-fn@1.2.0(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmkdirp@0.5.6(transitive)
- Removednormalize-package-data@2.5.0(transitive)
- Removednpm-run-path@2.0.2(transitive)
- Removednumber-is-nan@1.0.1(transitive)
- Removedos-locale@2.1.0(transitive)
- Removedp-finally@1.0.0(transitive)
- Removedp-limit@1.3.0(transitive)
- Removedp-locate@2.0.0(transitive)
- Removedp-try@1.0.0(transitive)
- Removedparse-json@2.2.0(transitive)
- Removedpath-exists@3.0.0(transitive)
- Removedpath-key@2.0.1(transitive)
- Removedpath-parse@1.0.7(transitive)
- Removedpath-type@2.0.0(transitive)
- Removedpify@2.3.0(transitive)
- Removedpseudomap@1.0.2(transitive)
- Removedread-pkg@2.0.0(transitive)
- Removedread-pkg-up@2.0.0(transitive)
- Removedrequire-main-filename@1.0.1(transitive)
- Removedresolve@1.22.10(transitive)
- Removedsemver@5.7.2(transitive)
- Removedset-blocking@2.0.0(transitive)
- Removedshebang-command@1.2.0(transitive)
- Removedshebang-regex@1.0.0(transitive)
- Removedsignal-exit@3.0.7(transitive)
- Removedsource-map@0.6.1(transitive)
- Removedsource-map-support@0.5.21(transitive)
- Removedspdx-correct@3.2.0(transitive)
- Removedspdx-exceptions@2.5.0(transitive)
- Removedspdx-expression-parse@3.0.1(transitive)
- Removedspdx-license-ids@3.0.21(transitive)
- Removedstring-width@1.0.22.1.1(transitive)
- Removedstrip-ansi@3.0.14.0.0(transitive)
- Removedstrip-bom@3.0.0(transitive)
- Removedstrip-eof@1.0.0(transitive)
- Removedsupports-preserve-symlinks-flag@1.0.0(transitive)
- Removedts-node@7.0.1(transitive)
- Removedvalidate-npm-package-license@3.0.4(transitive)
- Removedwhich@1.3.1(transitive)
- Removedwhich-module@2.0.1(transitive)
- Removedwrap-ansi@2.1.0(transitive)
- Removedy18n@3.2.2(transitive)
- Removedyallist@2.1.2(transitive)
- Removedyargs@8.0.2(transitive)
- Removedyargs-parser@7.0.0(transitive)
- Removedyn@2.0.0(transitive)
Updatedyargs@^16.2.0