first commit

This commit is contained in:
s.golasch
2023-08-01 13:49:46 +02:00
commit 1fc239fd54
20238 changed files with 3112246 additions and 0 deletions

3
build/node_modules/module-deps/test/files/bar.js generated vendored Normal file
View File

@@ -0,0 +1,3 @@
module.exports = function (n) {
return n * 100;
};

1
build/node_modules/module-deps/test/files/extra.js generated vendored Normal file
View File

@@ -0,0 +1 @@
module.exports = 555

View File

@@ -0,0 +1,10 @@
module.exports = {
events: require('events'),
fs : require('fs'),
net : require('net'),
http : require('http'),
https : require('https'),
dgram : require('dgram'),
dns : require('dns')
}

5
build/node_modules/module-deps/test/files/foo.js generated vendored Normal file
View File

@@ -0,0 +1,5 @@
var bar = require('./bar');
module.exports = function (n) {
return n * 111 + bar(n);
};

2
build/node_modules/module-deps/test/files/main.js generated vendored Normal file
View File

@@ -0,0 +1,2 @@
var foo = require('./foo');
console.log('main: ' + foo(5));

View File

@@ -0,0 +1 @@
module.exports = 1

View File

@@ -0,0 +1,3 @@
{
"main": "one.js"
}

View File

@@ -0,0 +1 @@
t.equal(require('./'), 2);

View File

@@ -0,0 +1 @@
module.exports = 2

View File

@@ -0,0 +1 @@
module.exports = function (x) { return x + BBB }

View File

@@ -0,0 +1,7 @@
var f = require('./f.js');
var m = require('m');
var g = require('g');
t.equal(m(f(AAA)), 777, 'transformation scope');
t.equal(g(3), 333, 'sub-transformation applied');
t.equal(typeof GGG, 'undefined', 'GGG leak');

View File

@@ -0,0 +1 @@
module.exports = function (x) { return x * GGG }

View File

@@ -0,0 +1,8 @@
var through = require('through2');
module.exports = function (file) {
return through(function (buf, enc, next) {
this.push(String(buf).replace(/GGG/g, '111'));
next();
});
};

View File

@@ -0,0 +1,6 @@
{
"main": "index.js",
"browserify": {
"transform": "insert-ggg"
}
}

View File

@@ -0,0 +1,8 @@
var through = require('through2');
module.exports = function (file) {
return through(function (buf, enc, next) {
this.push(String(buf).replace(/AAA/g, '5'));
next();
});
};

View File

@@ -0,0 +1,8 @@
var through = require('through2');
module.exports = function (file) {
return through(function (buf, enc, next) {
this.push(String(buf).replace(/BBB/g, '50'));
next();
});
};

View File

@@ -0,0 +1,3 @@
var AAA = 200, BBB = 300;
module.exports = function (x) { return AAA + BBB + MMM + x }

View File

@@ -0,0 +1,8 @@
var through = require('through2');
module.exports = function (file) {
return through(function (buf, enc, next) {
this.push(String(buf).replace(/MMM/g, '222'));
next();
});
};

View File

@@ -0,0 +1,6 @@
{
"main": "index.js",
"browserify": {
"transform": "insert-mmm"
}
}

View File

@@ -0,0 +1 @@
console.log(AAA + BBB + CCC + DDD + EEE + FFF);

View File

@@ -0,0 +1,5 @@
{
"browserify": {
"transform": [ "tr-a", "tr-b" ]
}
}

View File

@@ -0,0 +1 @@
module.exports = function (x) { return x + BBB }

View File

@@ -0,0 +1,8 @@
var through = require('through2');
module.exports = function (file) {
return through(function (buf, enc, next) {
this.push(String(buf).replace(/XXX/g, '123'));
next();
});
};

View File

@@ -0,0 +1,8 @@
var f = require('./f.js');
var m = require('m');
var g = require('g');
t.equal(m(f(AAA)), 555, 'transformation scope');
t.equal(g(3), 333, 'sub-transformation applied');
t.equal(typeof GGG, 'undefined', 'GGG leak');
t.equal(XXX, 123, 'XXX');

View File

@@ -0,0 +1,5 @@
{
"browserify": {
"transform": [ "./xxx.js" ]
}
}

View File

@@ -0,0 +1,8 @@
var through = require('through2');
module.exports = function (file) {
return through(function (buf, enc, next) {
this.push(String(buf).replace(/XXX/g, '123'));
next();
});
};

View File

@@ -0,0 +1 @@
console.log(AAA)

View File

@@ -0,0 +1,5 @@
{
"browserify": {
"transform": [ "./xxx.js" ]
}
}

View File

@@ -0,0 +1 @@
console.log(XXX * 3)

View File

@@ -0,0 +1,8 @@
var through = require('through2');
module.exports = function (file) {
return through(function (buf, enc, next) {
this.push(String(buf).replace(/XXX/g, '111'));
next();
});
};

1
build/node_modules/module-deps/test/files/tr_sh/f.js generated vendored Normal file
View File

@@ -0,0 +1 @@
module.exports = function (x) { return x + BBB }

View File

@@ -0,0 +1,7 @@
var f = require('./f.js');
var m = require('m');
var g = require('g');
t.equal(m(f(AAA)), 555, 'transformation scope');
t.equal(g(3), 333, 'sub-transformation applied');
t.equal(typeof GGG, 'undefined', 'GGG leak');

View File

@@ -0,0 +1 @@
module.exports = function (x) { return x * GGG }

View File

@@ -0,0 +1,6 @@
{
"main": "index.js",
"browserify": {
"transform": "./tr_g.js"
}
}

View File

@@ -0,0 +1,7 @@
var through = require('through2');
module.exports = function (file) {
return through(function (buf, enc, next) {
this.push(String(buf).replace(/GGG/g, '111'));
next();
});
};

View File

@@ -0,0 +1,3 @@
var AAA = 200, BBB = 300;
module.exports = function (x) { return AAA + BBB + x }

View File

@@ -0,0 +1,7 @@
var through = require('through2');
module.exports = function (file) {
return through(function (buf, enc, next) {
this.push(String(buf).replace(/AAA/g, '5'));
next();
});
};

View File

@@ -0,0 +1,7 @@
var through = require('through2');
module.exports = function (file) {
return through(function (buf, enc, next) {
this.push(String(buf).replace(/BBB/g, '50'));
next();
});
};

View File

@@ -0,0 +1,3 @@
var calc = require('algo').calc;
module.exports = function (x) { return calc(x); }

View File

@@ -0,0 +1,3 @@
var f = require('./f.js');
t.equal(f(14), 11, 'transformation scope');

View File

@@ -0,0 +1,3 @@
var decrement = require('./lib/decrement');
exports.calc = function (x) { return decrement(x) - GGG - GGG }

View File

@@ -0,0 +1 @@
module.exports = function (x) { return x - GGG }

View File

@@ -0,0 +1,8 @@
var through = require('through2');
module.exports = function (file) {
return through(function (buf, enc, next) {
this.push(String(buf).replace(/GGG/g, '1'));
next();
});
};

View File

@@ -0,0 +1,6 @@
{
"main": "index.js",
"browserify": {
"transform": "insert-ggg"
}
}

View File

@@ -0,0 +1,3 @@
module.exports = function (ñ) {
return ñ * 100;
};

View File

@@ -0,0 +1,5 @@
var é = require('./bar');
module.exports = function (ñ) {
return ñ * 111 + é(n);
};

View File

@@ -0,0 +1,2 @@
var π = require('./foo');
console.log('main: ' + foo(5));

2
build/node_modules/module-deps/test/files/xyz.js generated vendored Normal file
View File

@@ -0,0 +1,2 @@
var foo = require('./foo');
console.log('xyz: ' + foo(6));