[Release] Increase version to 1.1.5 (and #47) (#48)

This commit is contained in:
Nev 2022-04-28 11:46:02 -07:00 коммит произвёл GitHub
Родитель 731b3960a6
Коммит 98e5db7586
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
12 изменённых файлов: 497 добавлений и 639 удалений

Просмотреть файл

@ -1,5 +1,9 @@
# Releases
## 1.1.5 (Apr 28th, 2022)
- #47 [IE8] The _checkPrototype always fails on IE in IE8 mode
## 1.1.4 (Jun 3rd, 2021)
- #36 v1.1.3 postinstall requires rush to be installed

996
common/config/rush/npm-shrinkwrap.json сгенерированный

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -3,7 +3,11 @@
// See the @microsoft/rush package's LICENSE file for license information.
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
@ -36,10 +40,10 @@ const fs = __importStar(require("fs"));
const install_run_1 = require("./install-run");
const PACKAGE_NAME = '@microsoft/rush';
const RUSH_PREVIEW_VERSION = 'RUSH_PREVIEW_VERSION';
function _getRushVersion() {
function _getRushVersion(logger) {
const rushPreviewVersion = process.env[RUSH_PREVIEW_VERSION];
if (rushPreviewVersion !== undefined) {
console.log(`Using Rush version from environment variable ${RUSH_PREVIEW_VERSION}=${rushPreviewVersion}`);
logger.info(`Using Rush version from environment variable ${RUSH_PREVIEW_VERSION}=${rushPreviewVersion}`);
return rushPreviewVersion;
}
const rushJsonFolder = (0, install_run_1.findRushJsonFolder)();
@ -66,7 +70,28 @@ function _run() {
if (!nodePath || !scriptPath) {
throw new Error('Unexpected exception: could not detect node path or script path');
}
if (process.argv.length < 3) {
let commandFound = false;
let logger = { info: console.log, error: console.error };
for (const arg of packageBinArgs) {
if (arg === '-q' || arg === '--quiet') {
// The -q/--quiet flag is supported by both `rush` and `rushx`, and will suppress
// any normal informational/diagnostic information printed during startup.
//
// To maintain the same user experience, the install-run* scripts pass along this
// flag but also use it to suppress any diagnostic information normally printed
// to stdout.
logger = {
info: () => { },
error: console.error
};
}
else if (!arg.startsWith('-') || arg === '-h' || arg === '--help') {
// We either found something that looks like a command (i.e. - doesn't start with a "-"),
// or we found the -h/--help flag, which can be run without a command
commandFound = true;
}
}
if (!commandFound) {
console.log(`Usage: ${scriptName} <command> [args...]`);
if (scriptName === 'install-run-rush.js') {
console.log(`Example: ${scriptName} build --to myproject`);
@ -76,10 +101,10 @@ function _run() {
}
process.exit(1);
}
(0, install_run_1.runWithErrorAndStatusCode)(() => {
const version = _getRushVersion();
console.log(`The rush.json configuration requests Rush version ${version}`);
return (0, install_run_1.installAndRun)(PACKAGE_NAME, version, bin, packageBinArgs);
(0, install_run_1.runWithErrorAndStatusCode)(logger, () => {
const version = _getRushVersion(logger);
logger.info(`The rush.json configuration requests Rush version ${version}`);
return (0, install_run_1.installAndRun)(logger, PACKAGE_NAME, version, bin, packageBinArgs);
});
}
_run();

Просмотреть файл

@ -3,7 +3,11 @@
// See the @microsoft/rush package's LICENSE file for license information.
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
@ -79,9 +83,9 @@ function _parsePackageSpecifier(rawPackageSpecifier) {
*
* IMPORTANT: THIS CODE SHOULD BE KEPT UP TO DATE WITH Utilities.copyAndTrimNpmrcFile()
*/
function _copyAndTrimNpmrcFile(sourceNpmrcPath, targetNpmrcPath) {
console.log(`Transforming ${sourceNpmrcPath}`); // Verbose
console.log(` --> "${targetNpmrcPath}"`);
function _copyAndTrimNpmrcFile(logger, sourceNpmrcPath, targetNpmrcPath) {
logger.info(`Transforming ${sourceNpmrcPath}`); // Verbose
logger.info(` --> "${targetNpmrcPath}"`);
let npmrcFileLines = fs.readFileSync(sourceNpmrcPath).toString().split('\n');
npmrcFileLines = npmrcFileLines.map((line) => (line || '').trim());
const resultLines = [];
@ -125,16 +129,16 @@ function _copyAndTrimNpmrcFile(sourceNpmrcPath, targetNpmrcPath) {
*
* IMPORTANT: THIS CODE SHOULD BE KEPT UP TO DATE WITH Utilities._syncNpmrc()
*/
function _syncNpmrc(sourceNpmrcFolder, targetNpmrcFolder, useNpmrcPublish) {
function _syncNpmrc(logger, sourceNpmrcFolder, targetNpmrcFolder, useNpmrcPublish) {
const sourceNpmrcPath = path.join(sourceNpmrcFolder, !useNpmrcPublish ? '.npmrc' : '.npmrc-publish');
const targetNpmrcPath = path.join(targetNpmrcFolder, '.npmrc');
try {
if (fs.existsSync(sourceNpmrcPath)) {
_copyAndTrimNpmrcFile(sourceNpmrcPath, targetNpmrcPath);
_copyAndTrimNpmrcFile(logger, sourceNpmrcPath, targetNpmrcPath);
}
else if (fs.existsSync(targetNpmrcPath)) {
// If the source .npmrc doesn't exist and there is one in the target, delete the one in the target
console.log(`Deleting ${targetNpmrcPath}`); // Verbose
logger.info(`Deleting ${targetNpmrcPath}`); // Verbose
fs.unlinkSync(targetNpmrcPath);
}
}
@ -215,7 +219,7 @@ function _getRushTempFolder(rushCommonFolder) {
/**
* Resolve a package specifier to a static version
*/
function _resolvePackageVersion(rushCommonFolder, { name, version }) {
function _resolvePackageVersion(logger, rushCommonFolder, { name, version }) {
if (!version) {
version = '*'; // If no version is specified, use the latest version
}
@ -229,7 +233,7 @@ function _resolvePackageVersion(rushCommonFolder, { name, version }) {
try {
const rushTempFolder = _getRushTempFolder(rushCommonFolder);
const sourceNpmrcFolder = path.join(rushCommonFolder, 'config', 'rush');
_syncNpmrc(sourceNpmrcFolder, rushTempFolder);
_syncNpmrc(logger, sourceNpmrcFolder, rushTempFolder);
const npmPath = getNpmPath();
// This returns something that looks like:
// @microsoft/rush@3.0.0 '3.0.0'
@ -350,9 +354,9 @@ function _createPackageJson(packageInstallFolder, name, version) {
/**
* Run "npm install" in the package install folder.
*/
function _installPackage(packageInstallFolder, name, version) {
function _installPackage(logger, packageInstallFolder, name, version) {
try {
console.log(`Installing ${name}...`);
logger.info(`Installing ${name}...`);
const npmPath = getNpmPath();
const result = childProcess.spawnSync(npmPath, ['install'], {
stdio: 'inherit',
@ -362,7 +366,7 @@ function _installPackage(packageInstallFolder, name, version) {
if (result.status !== 0) {
throw new Error('"npm install" encountered an error');
}
console.log(`Successfully installed ${name}@${version}`);
logger.info(`Successfully installed ${name}@${version}`);
}
catch (e) {
throw new Error(`Unable to install package: ${e}`);
@ -388,7 +392,7 @@ function _writeFlagFile(packageInstallFolder) {
throw new Error(`Unable to create installed.flag file in ${packageInstallFolder}`);
}
}
function installAndRun(packageName, packageVersion, packageBinName, packageBinArgs) {
function installAndRun(logger, packageName, packageVersion, packageBinName, packageBinArgs) {
const rushJsonFolder = findRushJsonFolder();
const rushCommonFolder = path.join(rushJsonFolder, 'common');
const rushTempFolder = _getRushTempFolder(rushCommonFolder);
@ -397,14 +401,14 @@ function installAndRun(packageName, packageVersion, packageBinName, packageBinAr
// The package isn't already installed
_cleanInstallFolder(rushTempFolder, packageInstallFolder);
const sourceNpmrcFolder = path.join(rushCommonFolder, 'config', 'rush');
_syncNpmrc(sourceNpmrcFolder, packageInstallFolder);
_syncNpmrc(logger, sourceNpmrcFolder, packageInstallFolder);
_createPackageJson(packageInstallFolder, packageName, packageVersion);
_installPackage(packageInstallFolder, packageName, packageVersion);
_installPackage(logger, packageInstallFolder, packageName, packageVersion);
_writeFlagFile(packageInstallFolder);
}
const statusMessage = `Invoking "${packageBinName} ${packageBinArgs.join(' ')}"`;
const statusMessageLine = new Array(statusMessage.length + 1).join('-');
console.log(os.EOL + statusMessage + os.EOL + statusMessageLine + os.EOL);
logger.info(os.EOL + statusMessage + os.EOL + statusMessageLine + os.EOL);
const binPath = _getBinPath(packageInstallFolder, packageBinName);
const binFolderPath = path.resolve(packageInstallFolder, NODE_MODULES_FOLDER_NAME, '.bin');
// Windows environment variables are case-insensitive. Instead of using SpawnSyncOptions.env, we need to
@ -436,14 +440,14 @@ function installAndRun(packageName, packageVersion, packageBinName, packageBinAr
}
}
exports.installAndRun = installAndRun;
function runWithErrorAndStatusCode(fn) {
function runWithErrorAndStatusCode(logger, fn) {
process.exitCode = 1;
try {
const exitCode = fn();
process.exitCode = exitCode;
}
catch (e) {
console.error(os.EOL + os.EOL + e.toString() + os.EOL + os.EOL);
logger.error(os.EOL + os.EOL + e.toString() + os.EOL + os.EOL);
}
}
exports.runWithErrorAndStatusCode = runWithErrorAndStatusCode;
@ -462,16 +466,17 @@ function _run() {
console.log('Example: install-run.js qrcode@1.2.2 qrcode https://rushjs.io');
process.exit(1);
}
runWithErrorAndStatusCode(() => {
const logger = { info: console.log, error: console.error };
runWithErrorAndStatusCode(logger, () => {
const rushJsonFolder = findRushJsonFolder();
const rushCommonFolder = _ensureAndJoinPath(rushJsonFolder, 'common');
const packageSpecifier = _parsePackageSpecifier(rawPackageSpecifier);
const name = packageSpecifier.name;
const version = _resolvePackageVersion(rushCommonFolder, packageSpecifier);
const version = _resolvePackageVersion(logger, rushCommonFolder, packageSpecifier);
if (packageSpecifier.version !== version) {
console.log(`Resolved to ${name}@${version}`);
}
return installAndRun(name, version, packageBinName, packageBinArgs);
return installAndRun(logger, name, version, packageBinName, packageBinArgs);
});
}
_run();

Просмотреть файл

@ -3314,7 +3314,7 @@ img {
<div class="tsd-signature tsd-kind-icon">Dynamic<wbr>Proto<wbr>Delegate&lt;DPType&gt;<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span>theTarget<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">DPType</span>, baseFuncProxy<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">DPType</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/microsoft/DynamicProto-JS/blob/ac722ee/lib/src/DynamicProto.ts#L481">DynamicProto.ts:481</a></li>
<li>Defined in <a href="https://github.com/microsoft/DynamicProto-JS/blob/f424da6/lib/src/DynamicProto.ts#L494">DynamicProto.ts:494</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -3379,7 +3379,7 @@ img {
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/microsoft/DynamicProto-JS/blob/ac722ee/lib/src/DynamicProto.ts#L535">DynamicProto.ts:535</a></li>
<li>Defined in <a href="https://github.com/microsoft/DynamicProto-JS/blob/f424da6/lib/src/DynamicProto.ts#L548">DynamicProto.ts:548</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">

Просмотреть файл

@ -2762,7 +2762,7 @@ img {
<div class="tsd-signature tsd-kind-icon">set<wbr>Inst<wbr>Funcs<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/microsoft/DynamicProto-JS/blob/ac722ee/lib/src/DynamicProto.ts#L464">DynamicProto.ts:464</a></li>
<li>Defined in <a href="https://github.com/microsoft/DynamicProto-JS/blob/f424da6/lib/src/DynamicProto.ts#L477">DynamicProto.ts:477</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -2778,7 +2778,7 @@ img {
<div class="tsd-signature tsd-kind-icon">use<wbr>Base<wbr>Inst<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/microsoft/DynamicProto-JS/blob/ac722ee/lib/src/DynamicProto.ts#L470">DynamicProto.ts:470</a></li>
<li>Defined in <a href="https://github.com/microsoft/DynamicProto-JS/blob/f424da6/lib/src/DynamicProto.ts#L483">DynamicProto.ts:483</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">

Просмотреть файл

@ -3313,7 +3313,7 @@ img {
<div class="tsd-signature tsd-kind-icon">Dynamic<wbr>Proto<wbr>Delegate&lt;DPType&gt;<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span>theTarget<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">DPType</span>, baseFuncProxy<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">DPType</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/microsoft/DynamicProto-JS/blob/ac722ee/lib/src/DynamicProto.ts#L481">DynamicProto.ts:481</a></li>
<li>Defined in <a href="https://github.com/microsoft/DynamicProto-JS/blob/f424da6/lib/src/DynamicProto.ts#L494">DynamicProto.ts:494</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -3378,7 +3378,7 @@ img {
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/microsoft/DynamicProto-JS/blob/ac722ee/lib/src/DynamicProto.ts#L535">DynamicProto.ts:535</a></li>
<li>Defined in <a href="https://github.com/microsoft/DynamicProto-JS/blob/f424da6/lib/src/DynamicProto.ts#L548">DynamicProto.ts:548</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">

Просмотреть файл

@ -44,8 +44,8 @@
"devDependencies": {
"@microsoft/applicationinsights-rollup-es3" : "^1.0.1",
"@microsoft/dynamicproto-rollup": "1.0.0",
"grunt": "^1.4.1",
"grunt-cli": "^1.3.2",
"grunt": "^1.5.2",
"grunt-cli": "^1.4.3",
"grunt-contrib-qunit": "^4.0.0",
"grunt-contrib-uglify": "^5.0.1",
"grunt-run": "^0.8.1",

Просмотреть файл

@ -60,6 +60,11 @@ const DynAllowInstChkTag = DynInstChkTag;
*/
const DynProtoDefaultOptions = '_dfOpts';
/**
* The polyfill version of __proto__ so that it doesn't cause issues for anyone not expecting it to exist
*/
const DynProtoPolyProto = "_dynProto";
/**
* Value used as the name of a class when it cannot be determined
* @ignore
@ -135,8 +140,13 @@ function _getObjProto(target:any) {
}
// target[Constructor] May break if the constructor has been changed or removed
let newProto = target[str__Proto] || target[Prototype] || (target[Constructor] ? target[Constructor][Prototype] : null);
let newProto = target[DynProtoPolyProto] || target[str__Proto] || target[Prototype] || (target[Constructor] ? target[Constructor][Prototype] : null);
if(newProto) {
// Set the _dynProto so the hierarchy can lookup base classes correctly on IE8
if (!target[DynProtoPolyProto]) {
target[DynProtoPolyProto] = newProto;
}
return newProto;
}
}
@ -431,9 +441,12 @@ function _checkPrototype(classProto:any, thisTarget:any) {
visited.push(thisProto);
thisProto = _getObjProto(thisProto);
}
return false;
}
return false;
// If objGetPrototypeOf doesn't exist then just assume everything is ok.
return true;
}
/**

Просмотреть файл

@ -1,7 +1,7 @@
{
"name": "@microsoft/dynamicproto-js",
"description": "Microsoft Dynamic Proto Utility",
"version": "1.1.4",
"version": "1.1.5",
"keywords": [
"javascript",
"dynamic prototype",
@ -40,6 +40,7 @@
"homepage": "https://github.com/microsoft/DynamicProto-JS#readme",
"dependencies": {},
"devDependencies": {
"@microsoft/rush": "^5.67.0",
"@nevware21/grunt-ts-plugin": "^0.3.0",
"@nevware21/grunt-eslint-ts": "^0.1.0",
"@typescript-eslint/eslint-plugin": "^4.28.0",
@ -50,8 +51,8 @@
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-security": "^1.4.0",
"grunt": "^1.4.1",
"grunt-cli": "^1.3.2",
"grunt": "^1.5.2",
"grunt-cli": "^1.4.3",
"grunt-contrib-qunit": "^4.0.0",
"grunt-contrib-uglify": "^5.0.1",
"grunt-run": "^0.8.1",

Просмотреть файл

@ -33,8 +33,8 @@
},
"homepage": "https://github.com/microsoft/DynamicProto-JS#readme",
"devDependencies": {
"grunt": "^1.4.1",
"grunt-cli": "^1.3.2",
"grunt": "^1.5.2",
"grunt-cli": "^1.4.3",
"grunt-contrib-qunit": "^4.0.0",
"grunt-contrib-uglify": "^5.0.1",
"grunt-run": "^0.8.1",

Просмотреть файл

@ -2,8 +2,8 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush.schema.json",
"npmVersion": "8.3.2",
"rushVersion": "5.61.3",
"npmVersion": "8.8.0",
"rushVersion": "5.67.0",
"projectFolderMaxDepth": 4,
"projects": [
{