Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

task-serializer

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

task-serializer - npm Package Compare versions

Comparing version 2.1.3 to 2.1.4

17

package.json
{
"name": "task-serializer",
"version": "2.1.3",
"version": "2.1.4",
"description": "Serialize tasks/promises for integrated control. Option for limiting number of concurrent tasks.",

@@ -22,4 +22,6 @@ "main": "dist/index.js",

"scripts": {
"test": "node ./tests-js/script-test.js;node ./tests-ts/script-test.js",
"prepublishOnly": "node scripts/check-package-depends.js && node scripts-ts/pre-publish-test.js ./tests-js ./examples-js ./tests-ts ./examples-ts",
"test": "npm run clean-all && node scripts/check-package-depends.js && npx eslint && npm run build-all && npm run test-scripts && node scripts-ts/pre-publish-test.js ./tests-js ./examples-js ./tests-ts ./examples-ts && node scripts/verda-pub-test.js",
"prePublishOnly": "npm run prePublishShort",
"test-scripts": "node ./tests-js/script-test.js && node ./tests-ts/script-test.js",
"prePublishShort": "node scripts/check-package-depends.js && npx eslint",
"build-dist": "tsc",

@@ -29,7 +31,10 @@ "build-tests": "tsc -p tsconfig.tests.json",

"clean-dist": "rm dist/*",
"clean-tests": "bash -c 'rm -f tests-ts/*.{js,js.map,d.ts}; rm -f scripts-ts/*.{js,js.map,d.ts}' ; rm -f dist-*/*; rmdir dist-* 2>/dev/null || true ; ",
"clean-all": "npm run clean-dist; npm run clean-tests"
"clean-tests": "bash -c 'rm -f tests-ts/*.{js,js.map,d.ts} && rm -f scripts-ts/*.{js,js.map,d.ts}' && rm -rf examples*",
"clean-all": "npm run clean-dist && npm run clean-tests"
},
"devConfig": {
"verdaccioUrl": "http://127.0.0.1:44873"
},
"engines": {
"node": ">=12.9"
"node": ">=10.13"
},

@@ -36,0 +41,0 @@ "keywords": [

@@ -24,13 +24,16 @@ "use strict";

assert.strictEqual(typeof nodeSubdir, 'string');
let ext = isTS ? '.ts' : '.js';
let subdirs = [nonodeSubdir, nodeSubdir];
const ext = isTS ? '.ts' : '.js';
const subdirs = [nonodeSubdir, nodeSubdir];
await fs_1.promises.rmdir(dstdir, { recursive: true });
await fs_1.promises.mkdir(dstdir + '/' + subdirs[0], { recursive: true });
await fs_1.promises.mkdir(dstdir + '/' + subdirs[1], { recursive: true });
let proms = [];
for (let fn of filenames) {
let fnin = srcdir + '/' + fn + ext;
for (let isnodejs of [false, true]) {
let fnout = dstdir + '/' + subdirs[Number(isnodejs)] + '/' + fn + ext;
proms.push(new Promise((resolve, reject) => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const proms = [];
for (const fn of filenames) {
const fnin = srcdir + '/' + fn + ext;
for (const isnodejs of [false, true]) {
const fnout = dstdir + '/' + subdirs[Number(isnodejs)] + '/' + fn + ext;
proms.push(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
new Promise((resolve, reject) => {
fs.createReadStream(fnin)

@@ -37,0 +40,0 @@ .pipe(mini_preproc_1.createPreprocStream({

@@ -36,7 +36,8 @@ "use strict";

*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function promit(func, ...args) {
return new Promise((resolve, reject) => {
let cb_outer = (...cbargs) => {
const cb_outer = (...cbargs) => {
try {
let r = args.slice(-1)[0](...cbargs);
const r = args.slice(-1)[0](...cbargs);
resolve(r);

@@ -54,3 +55,3 @@ }

if (err) {
let msg = `
const msg = `
==================

@@ -103,6 +104,7 @@ ::: ${cmd} :::

tsDstDir = './' + tsDstDir;
let proms = [];
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const proms = [];
for (let i = 0; i < 2; i++) {
let rootRelFns = [];
for (let f of demo_filenames_1.default)
const rootRelFns = [];
for (const f of demo_filenames_1.default)
rootRelFns.push(`${tsDstDir}/${tsconfMnem[i]}/${f}.ts`);

@@ -122,3 +124,3 @@ proms.push(fs_1.promises

console.log('[OK] npm install --save-dev @types/node');
for (let mnem of tsconfMnem) {
for (const mnem of tsconfMnem) {
cp.execSync(`npm install --save-dev @tsconfig/${mnem}`);

@@ -131,6 +133,7 @@ console.log('[OK] ' + `npm install --save-dev @tsconfig/${mnem}`);

async function demos(dstDir) {
let proms = [];
for (let mnem of tsconfMnem) {
for (let f of demo_filenames_1.default) {
let fn = `node ${dstDir}/${mnem}/${f}.js`;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const proms = [];
for (const mnem of tsconfMnem) {
for (const f of demo_filenames_1.default) {
const fn = `node ${dstDir}/${mnem}/${f}.js`;
proms.push(exec(fn));

@@ -155,4 +158,3 @@ }

(async () => {
let jsDstDir = process.argv[3];
// @ts-ignore
const jsDstDir = process.argv[3];
await gen_examples_1.default(demo_filenames_1.default, process.argv[2], process.argv[3], false, tsconfMnem[0], tsconfMnem[1]).then(() => {

@@ -168,5 +170,4 @@ console.log('[OK] genExamples js');

return Promise.resolve();
let tsDstDir = process.argv[5];
const tsDstDir = process.argv[5];
await Promise.all([
// @ts-ignore
gen_examples_1.default(demo_filenames_1.default, process.argv[4], process.argv[5], true, tsconfMnem[0], tsconfMnem[1]).then(() => {

@@ -173,0 +174,0 @@ console.log('[OK] genExamples ts');

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc