Current Dev State

This commit is contained in:
Tim Lorsbach
2025-06-23 20:13:54 +02:00
parent b4f9bb277d
commit ded50edaa2
22617 changed files with 4345095 additions and 174 deletions

View File

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

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')
}

View File

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

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();
});
};

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));

View File

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