Fixed #1 - Fixed the whatsnew-** script for loading release notes into builds
Added test to ensure that release notes are parsed properly Updated to latest dependencies to fix security vulnerability Updated GH Actions Workflow to run test before updating tag Updated README.md to reflect proper whatsnew documentation.
This commit is contained in:
44
node_modules/ts-jest/dist/config/config-set.d.ts
generated
vendored
44
node_modules/ts-jest/dist/config/config-set.d.ts
generated
vendored
@@ -4,29 +4,29 @@ import { CompilerOptions, CustomTransformers, ParsedCommandLine } from 'typescri
|
||||
import { AstTransformerDesc, BabelConfig, BabelJestTransformer, TTypeScript, TsCompiler, TsJestConfig, TsJestGlobalOptions, TsJestHooksMap } from '../types';
|
||||
export declare class ConfigSet {
|
||||
readonly parentOptions?: TsJestGlobalOptions | undefined;
|
||||
readonly projectPackageJson: Record<string, any>;
|
||||
readonly projectDependencies: Record<string, string>;
|
||||
readonly jest: jest.ProjectConfig;
|
||||
readonly tsJest: TsJestConfig;
|
||||
readonly typescript: ParsedCommandLine;
|
||||
readonly tsconfig: any;
|
||||
readonly versions: Record<string, string>;
|
||||
get projectPackageJson(): Record<string, any>;
|
||||
get projectDependencies(): Record<string, string>;
|
||||
get jest(): jest.ProjectConfig;
|
||||
get tsJest(): TsJestConfig;
|
||||
get typescript(): ParsedCommandLine;
|
||||
get tsconfig(): any;
|
||||
get versions(): Record<string, string>;
|
||||
private static loadConfig;
|
||||
readonly babel: BabelConfig | undefined;
|
||||
readonly compilerModule: TTypeScript;
|
||||
readonly babelJestTransformer: BabelJestTransformer | undefined;
|
||||
readonly tsCompiler: TsCompiler;
|
||||
readonly astTransformers: AstTransformerDesc[];
|
||||
readonly tsCustomTransformers: CustomTransformers;
|
||||
readonly hooks: TsJestHooksMap;
|
||||
readonly shouldReportDiagnostic: (filePath: string) => boolean;
|
||||
readonly shouldStringifyContent: (filePath: string) => boolean;
|
||||
readonly tsCacheDir: string | undefined;
|
||||
readonly overriddenCompilerOptions: Partial<CompilerOptions>;
|
||||
readonly rootDir: string;
|
||||
readonly cwd: string;
|
||||
readonly tsJestDigest: string;
|
||||
readonly cacheKey: string;
|
||||
get babel(): BabelConfig | undefined;
|
||||
get compilerModule(): TTypeScript;
|
||||
get babelJestTransformer(): BabelJestTransformer | undefined;
|
||||
get tsCompiler(): TsCompiler;
|
||||
get astTransformers(): AstTransformerDesc[];
|
||||
get tsCustomTransformers(): CustomTransformers;
|
||||
get hooks(): TsJestHooksMap;
|
||||
get shouldReportDiagnostic(): (filePath: string) => boolean;
|
||||
get shouldStringifyContent(): (filePath: string) => boolean;
|
||||
get tsCacheDir(): string | undefined;
|
||||
get overriddenCompilerOptions(): Partial<CompilerOptions>;
|
||||
get rootDir(): string;
|
||||
get cwd(): string;
|
||||
get tsJestDigest(): string;
|
||||
get cacheKey(): string;
|
||||
readonly logger: Logger;
|
||||
constructor(jestConfig: jest.ProjectConfig, parentOptions?: TsJestGlobalOptions | undefined, parentLogger?: Logger);
|
||||
resolvePath(inputPath: string, { throwIfMissing, nodeResolve }?: {
|
||||
|
||||
37
node_modules/ts-jest/dist/config/config-set.js
generated
vendored
37
node_modules/ts-jest/dist/config/config-set.js
generated
vendored
@@ -16,15 +16,16 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __values = (this && this.__values) || function (o) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
|
||||
var __values = (this && this.__values) || function(o) {
|
||||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
||||
if (m) return m.call(o);
|
||||
return {
|
||||
if (o && typeof o.length === "number") return {
|
||||
next: function () {
|
||||
if (o && i >= o.length) o = void 0;
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
};
|
||||
var __read = (this && this.__read) || function (o, n) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
||||
@@ -46,15 +47,12 @@ var __spread = (this && this.__spread) || function () {
|
||||
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
|
||||
return ar;
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var bs_logger_1 = require("bs-logger");
|
||||
var fs_1 = require("fs");
|
||||
var json5_1 = __importDefault(require("json5"));
|
||||
var json5 = require("json5");
|
||||
var path_1 = require("path");
|
||||
var semver_1 = __importDefault(require("semver"));
|
||||
var semver = require("semver");
|
||||
var __1 = require("..");
|
||||
var compiler_1 = require("../compiler");
|
||||
var transformers_1 = require("../transformers");
|
||||
@@ -88,8 +86,8 @@ var toDiagnosticCode = function (code) {
|
||||
return code ? parseInt(("" + code).trim().replace(/^TS/, ''), 10) || undefined : undefined;
|
||||
};
|
||||
var toDiagnosticCodeList = function (items, into) {
|
||||
if (into === void 0) { into = []; }
|
||||
var e_1, _a;
|
||||
if (into === void 0) { into = []; }
|
||||
if (!Array.isArray(items))
|
||||
items = [items];
|
||||
try {
|
||||
@@ -166,7 +164,7 @@ var ConfigSet = (function () {
|
||||
Object.defineProperty(ConfigSet.prototype, "projectDependencies", {
|
||||
get: function () {
|
||||
var pkg = this.projectPackageJson;
|
||||
var names = Object.keys(__assign({}, pkg.optionalDependencies, pkg.peerDependencies, pkg.devDependencies, pkg.dependencies));
|
||||
var names = Object.keys(__assign(__assign(__assign(__assign({}, pkg.optionalDependencies), pkg.peerDependencies), pkg.devDependencies), pkg.dependencies));
|
||||
return names.reduce(function (map, name) {
|
||||
var version = get_package_version_1.getPackageVersion(name);
|
||||
if (version)
|
||||
@@ -182,7 +180,7 @@ var ConfigSet = (function () {
|
||||
var config = backports_1.backportJestConfig(this.logger, this._jestConfig);
|
||||
if (this.parentOptions) {
|
||||
var globals = config.globals || (config.globals = {});
|
||||
globals['ts-jest'] = __assign({}, this.parentOptions, globals['ts-jest']);
|
||||
globals['ts-jest'] = __assign(__assign({}, this.parentOptions), globals['ts-jest']);
|
||||
}
|
||||
this.logger.debug({ jestConfig: config }, 'normalized jest config');
|
||||
return config;
|
||||
@@ -342,7 +340,7 @@ var ConfigSet = (function () {
|
||||
});
|
||||
ConfigSet.loadConfig = function (base) {
|
||||
var _a = importer_1.importer.babelCore(messages_1.ImportReasons.BabelJest), OptionManager = _a.OptionManager, loadPartialConfig = _a.loadPartialConfig, version = _a.version;
|
||||
if (version && semver_1.default.satisfies(version, '>=6 <7')) {
|
||||
if (version && semver.satisfies(version, '>=6 <7')) {
|
||||
delete base.cwd;
|
||||
}
|
||||
if (typeof loadPartialConfig === 'function') {
|
||||
@@ -363,11 +361,16 @@ var ConfigSet = (function () {
|
||||
var base = { cwd: this.cwd };
|
||||
if (babelConfig.kind === 'file') {
|
||||
if (babelConfig.value) {
|
||||
base = __assign({}, base, json5_1.default.parse(fs_1.readFileSync(babelConfig.value, 'utf8')));
|
||||
if (path_1.extname(babelConfig.value) === '.js') {
|
||||
base = __assign(__assign({}, base), require(babelConfig.value));
|
||||
}
|
||||
else {
|
||||
base = __assign(__assign({}, base), json5.parse(fs_1.readFileSync(babelConfig.value, 'utf8')));
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (babelConfig.kind === 'inline') {
|
||||
base = __assign({}, base, babelConfig.value);
|
||||
base = __assign(__assign({}, base), babelConfig.value);
|
||||
}
|
||||
var config = ConfigSet.loadConfig(base);
|
||||
this.logger.debug({ babelConfig: config }, 'normalized babel config');
|
||||
@@ -534,7 +537,9 @@ var ConfigSet = (function () {
|
||||
declarationDir: undefined,
|
||||
declarationMap: undefined,
|
||||
emitDeclarationOnly: undefined,
|
||||
incremental: undefined,
|
||||
sourceRoot: undefined,
|
||||
tsBuildInfoFile: undefined,
|
||||
};
|
||||
if (!this.tsJest.babelConfig) {
|
||||
options.module = this.compilerModule.ModuleKind.CommonJS;
|
||||
@@ -635,11 +640,11 @@ var ConfigSet = (function () {
|
||||
};
|
||||
}
|
||||
config = result_1.config;
|
||||
input = __assign({}, result_1.config, { compilerOptions: __assign({}, (result_1.config && result_1.config.compilerOptions), compilerOptions) });
|
||||
input = __assign(__assign({}, result_1.config), { compilerOptions: __assign(__assign({}, (result_1.config && result_1.config.compilerOptions)), compilerOptions) });
|
||||
basePath = normalize_slashes_1.normalizeSlashes(path_1.dirname(configFileName));
|
||||
}
|
||||
}
|
||||
config.compilerOptions = __assign({}, config.compilerOptions, compilerOptions);
|
||||
config.compilerOptions = __assign(__assign({}, config.compilerOptions), compilerOptions);
|
||||
var result = ts.parseJsonConfigFileContent(config, ts.sys, basePath, undefined, configFileName);
|
||||
var forcedOptions = this.overriddenCompilerOptions;
|
||||
var finalOptions = result.options;
|
||||
|
||||
6
node_modules/ts-jest/dist/config/create-jest-preset.js
generated
vendored
6
node_modules/ts-jest/dist/config/create-jest-preset.js
generated
vendored
@@ -14,10 +14,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var logger_1 = require("../util/logger");
|
||||
var logger = logger_1.rootLogger.child({ namespace: 'jest-preset' });
|
||||
function createJestPreset(_a, from) {
|
||||
var _b = (_a === void 0 ? {} : _a).allowJs, allowJs = _b === void 0 ? false : _b;
|
||||
var _b;
|
||||
var _c = (_a === void 0 ? {} : _a).allowJs, allowJs = _c === void 0 ? false : _c;
|
||||
if (from === void 0) { from = {}; }
|
||||
var _c;
|
||||
logger.debug({ allowJs: allowJs }, 'creating jest presets', allowJs ? 'handling' : 'not handling', 'JavaScript files');
|
||||
return __assign({ transform: __assign({}, from.transform, (_c = {}, _c[allowJs ? '^.+\\.[tj]sx?$' : '^.+\\.tsx?$'] = 'ts-jest', _c)) }, (from.testMatch ? { testMatch: from.testMatch } : undefined), (from.moduleFileExtensions ? { moduleFileExtensions: from.moduleFileExtensions } : undefined));
|
||||
return __assign(__assign({ transform: __assign(__assign({}, from.transform), (_b = {}, _b[allowJs ? '^.+\\.[tj]sx?$' : '^.+\\.tsx?$'] = 'ts-jest', _b)) }, (from.testMatch ? { testMatch: from.testMatch } : undefined)), (from.moduleFileExtensions ? { moduleFileExtensions: from.moduleFileExtensions } : undefined));
|
||||
}
|
||||
exports.createJestPreset = createJestPreset;
|
||||
|
||||
15
node_modules/ts-jest/dist/config/paths-to-module-name-mapper.js
generated
vendored
15
node_modules/ts-jest/dist/config/paths-to-module-name-mapper.js
generated
vendored
@@ -1,24 +1,25 @@
|
||||
"use strict";
|
||||
var __values = (this && this.__values) || function (o) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
|
||||
var __values = (this && this.__values) || function(o) {
|
||||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
||||
if (m) return m.call(o);
|
||||
return {
|
||||
if (o && typeof o.length === "number") return {
|
||||
next: function () {
|
||||
if (o && i >= o.length) o = void 0;
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var _a;
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var bs_logger_1 = require("bs-logger");
|
||||
var logger_1 = require("../util/logger");
|
||||
var messages_1 = require("../util/messages");
|
||||
var escapeRegex = function (str) { return str.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&'); };
|
||||
var logger = logger_1.rootLogger.child((_a = {}, _a[bs_logger_1.LogContexts.namespace] = 'path-mapper', _a));
|
||||
exports.pathsToModuleNameMapper = function (mapping, _a) {
|
||||
var _b = (_a === void 0 ? {} : _a).prefix, prefix = _b === void 0 ? '' : _b;
|
||||
var e_1, _c;
|
||||
var e_1, _b;
|
||||
var _c = (_a === void 0 ? {} : _a).prefix, prefix = _c === void 0 ? '' : _c;
|
||||
var jestMap = {};
|
||||
try {
|
||||
for (var _d = __values(Object.keys(mapping)), _e = _d.next(); !_e.done; _e = _d.next()) {
|
||||
@@ -54,7 +55,7 @@ exports.pathsToModuleNameMapper = function (mapping, _a) {
|
||||
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_e && !_e.done && (_c = _d.return)) _c.call(_d);
|
||||
if (_e && !_e.done && (_b = _d.return)) _b.call(_d);
|
||||
}
|
||||
finally { if (e_1) throw e_1.error; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user