@putout/bundle 5.2.0 → 5.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/putout.js +105 -91
- package/bundle/putout.min.js +1 -1
- package/bundle/putout.slim.js +105 -91
- package/package.json +2 -2
package/bundle/putout.slim.js
CHANGED
|
@@ -27,7 +27,7 @@ function getAugmentedNamespace(n) {
|
|
|
27
27
|
return a;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
var fullstore = (value) => {
|
|
30
|
+
var fullstore$1 = (value) => {
|
|
31
31
|
const data = {
|
|
32
32
|
value,
|
|
33
33
|
};
|
|
@@ -44,7 +44,7 @@ var fullstore = (value) => {
|
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
-
var fullstore$
|
|
47
|
+
var fullstore$2 = fullstore$1;
|
|
48
48
|
|
|
49
49
|
var global$1 = (typeof global !== "undefined" ? global :
|
|
50
50
|
typeof self !== "undefined" ? self :
|
|
@@ -59106,7 +59106,7 @@ const tokenize = (ast, overrides) => {
|
|
|
59106
59106
|
traverse,
|
|
59107
59107
|
maybe,
|
|
59108
59108
|
quote,
|
|
59109
|
-
store: fullstore$
|
|
59109
|
+
store: fullstore$2(),
|
|
59110
59110
|
});
|
|
59111
59111
|
|
|
59112
59112
|
const currentTraversers = {
|
|
@@ -59266,13 +59266,13 @@ var removeBlankLines$1 = lib.default;
|
|
|
59266
59266
|
|
|
59267
59267
|
const __json_name$1 = '__putout_processor_json';
|
|
59268
59268
|
const __yaml_name$1 = '__putout_processor_yaml';
|
|
59269
|
-
const __filesystem_name$
|
|
59269
|
+
const __filesystem_name$3 = '__putout_processor_filesystem';
|
|
59270
59270
|
const __ignore_name$1 = '__putout_processor_ignore';
|
|
59271
59271
|
|
|
59272
59272
|
const TYPES$1 = [
|
|
59273
59273
|
__json_name$1,
|
|
59274
59274
|
__yaml_name$1,
|
|
59275
|
-
__filesystem_name$
|
|
59275
|
+
__filesystem_name$3,
|
|
59276
59276
|
__ignore_name$1,
|
|
59277
59277
|
];
|
|
59278
59278
|
|
|
@@ -64250,10 +64250,101 @@ function validateDeclare(declare) {
|
|
|
64250
64250
|
throw Error(`☝️ Looks like 'declare' property value is not a 'function', but '${typeof declare}' with value '${stringify(declare)}'.`);
|
|
64251
64251
|
}
|
|
64252
64252
|
|
|
64253
|
-
|
|
64254
|
-
|
|
64253
|
+
function fullstore(value) {
|
|
64254
|
+
const data = {
|
|
64255
|
+
value,
|
|
64256
|
+
};
|
|
64257
|
+
|
|
64258
|
+
return (...args) => {
|
|
64259
|
+
const [value] = args;
|
|
64260
|
+
|
|
64261
|
+
if (!args.length)
|
|
64262
|
+
return data.value;
|
|
64263
|
+
|
|
64264
|
+
data.value = value;
|
|
64265
|
+
|
|
64266
|
+
return value;
|
|
64267
|
+
};
|
|
64268
|
+
}
|
|
64269
|
+
|
|
64270
|
+
const cut = (a) => a.slice(0, a.indexOf('('));
|
|
64271
|
+
const createPrefix = (name) => {
|
|
64272
|
+
if (name.includes('('))
|
|
64273
|
+
return `${cut(name)}(`;
|
|
64274
|
+
|
|
64275
|
+
return `${name}(`;
|
|
64276
|
+
};
|
|
64277
|
+
|
|
64278
|
+
const createSuffix = () => ');\n';
|
|
64279
|
+
const maybeNewline = (a) => a.at(-1) === '\n' ? a : `${a}\n`;
|
|
64280
|
+
|
|
64281
|
+
const __json_name = '__putout_processor_json';
|
|
64282
|
+
const __yaml_name = '__putout_processor_yaml';
|
|
64283
|
+
const __toml_name = '__putout_processor_toml';
|
|
64284
|
+
const __filesystem_name$2 = '__putout_processor_filesystem';
|
|
64285
|
+
const __ignore_name = '__putout_processor_ignore';
|
|
64286
|
+
|
|
64287
|
+
const __json = `${__json_name}(__object)`;
|
|
64288
|
+
const __yaml = `${__yaml_name}(__object)`;
|
|
64289
|
+
const __toml = `${__toml_name}(__object)`;
|
|
64290
|
+
const __filesystem = `${__filesystem_name$2}(__object)`;
|
|
64291
|
+
const __ignore = `${__ignore_name}(__array)`;
|
|
64292
|
+
|
|
64293
|
+
const TYPES = [
|
|
64294
|
+
__json_name,
|
|
64295
|
+
__yaml_name,
|
|
64296
|
+
__filesystem_name$2,
|
|
64297
|
+
__ignore_name,
|
|
64298
|
+
];
|
|
64255
64299
|
|
|
64256
|
-
const
|
|
64300
|
+
const toJS = (source, name = __json) => {
|
|
64301
|
+
const prefix = createPrefix(name);
|
|
64302
|
+
const suffix = createSuffix();
|
|
64303
|
+
|
|
64304
|
+
return `${prefix}${source}${suffix}`;
|
|
64305
|
+
};
|
|
64306
|
+
|
|
64307
|
+
const fromJS = (source, name = __json) => {
|
|
64308
|
+
source = maybeNewline(source);
|
|
64309
|
+
const shortName = cut(name);
|
|
64310
|
+
|
|
64311
|
+
source = source.slice(source.indexOf(shortName));
|
|
64312
|
+
|
|
64313
|
+
const prefix = createPrefix(name);
|
|
64314
|
+
const suffix = createSuffix();
|
|
64315
|
+
const length = source.length - suffix.length;
|
|
64316
|
+
const sliced = source.slice(prefix.length, length);
|
|
64317
|
+
|
|
64318
|
+
return maybeNewline(removeBlankLines$1(sliced));
|
|
64319
|
+
};
|
|
64320
|
+
|
|
64321
|
+
const isJSON = (source) => {
|
|
64322
|
+
for (const type of TYPES) {
|
|
64323
|
+
if (!source.indexOf(type))
|
|
64324
|
+
return true;
|
|
64325
|
+
}
|
|
64326
|
+
|
|
64327
|
+
return false;
|
|
64328
|
+
};
|
|
64329
|
+
|
|
64330
|
+
var json = /*#__PURE__*/Object.freeze({
|
|
64331
|
+
__proto__: null,
|
|
64332
|
+
__filesystem: __filesystem,
|
|
64333
|
+
__filesystem_name: __filesystem_name$2,
|
|
64334
|
+
__ignore: __ignore,
|
|
64335
|
+
__ignore_name: __ignore_name,
|
|
64336
|
+
__json: __json,
|
|
64337
|
+
__json_name: __json_name,
|
|
64338
|
+
__toml: __toml,
|
|
64339
|
+
__toml_name: __toml_name,
|
|
64340
|
+
__yaml: __yaml,
|
|
64341
|
+
__yaml_name: __yaml_name,
|
|
64342
|
+
fromJS: fromJS,
|
|
64343
|
+
isJSON: isJSON,
|
|
64344
|
+
toJS: toJS
|
|
64345
|
+
});
|
|
64346
|
+
|
|
64347
|
+
const driverStore = fullstore();
|
|
64257
64348
|
|
|
64258
64349
|
const {assign} = Object;
|
|
64259
64350
|
const noop = () => {};
|
|
@@ -64792,83 +64883,6 @@ var require$$0 = /*@__PURE__*/getAugmentedNamespace(bundle);
|
|
|
64792
64883
|
|
|
64793
64884
|
var require$$3 = /*@__PURE__*/getAugmentedNamespace(filesystem);
|
|
64794
64885
|
|
|
64795
|
-
const cut = (a) => a.slice(0, a.indexOf('('));
|
|
64796
|
-
const createPrefix = (name) => {
|
|
64797
|
-
if (name.includes('('))
|
|
64798
|
-
return `${cut(name)}(`;
|
|
64799
|
-
|
|
64800
|
-
return `${name}(`;
|
|
64801
|
-
};
|
|
64802
|
-
|
|
64803
|
-
const createSuffix = () => ');\n';
|
|
64804
|
-
const maybeNewline = (a) => a.at(-1) === '\n' ? a : `${a}\n`;
|
|
64805
|
-
|
|
64806
|
-
const __json_name = '__putout_processor_json';
|
|
64807
|
-
const __yaml_name = '__putout_processor_yaml';
|
|
64808
|
-
const __toml_name = '__putout_processor_toml';
|
|
64809
|
-
const __filesystem_name$2 = '__putout_processor_filesystem';
|
|
64810
|
-
const __ignore_name = '__putout_processor_ignore';
|
|
64811
|
-
|
|
64812
|
-
const __json = `${__json_name}(__object)`;
|
|
64813
|
-
const __yaml = `${__yaml_name}(__object)`;
|
|
64814
|
-
const __toml = `${__toml_name}(__object)`;
|
|
64815
|
-
const __filesystem = `${__filesystem_name$2}(__object)`;
|
|
64816
|
-
const __ignore = `${__ignore_name}(__array)`;
|
|
64817
|
-
|
|
64818
|
-
const TYPES = [
|
|
64819
|
-
__json_name,
|
|
64820
|
-
__yaml_name,
|
|
64821
|
-
__filesystem_name$2,
|
|
64822
|
-
__ignore_name,
|
|
64823
|
-
];
|
|
64824
|
-
|
|
64825
|
-
const toJS = (source, name = __json) => {
|
|
64826
|
-
const prefix = createPrefix(name);
|
|
64827
|
-
const suffix = createSuffix();
|
|
64828
|
-
|
|
64829
|
-
return `${prefix}${source}${suffix}`;
|
|
64830
|
-
};
|
|
64831
|
-
|
|
64832
|
-
const fromJS = (source, name = __json) => {
|
|
64833
|
-
source = maybeNewline(source);
|
|
64834
|
-
const shortName = cut(name);
|
|
64835
|
-
|
|
64836
|
-
source = source.slice(source.indexOf(shortName));
|
|
64837
|
-
|
|
64838
|
-
const prefix = createPrefix(name);
|
|
64839
|
-
const suffix = createSuffix();
|
|
64840
|
-
const length = source.length - suffix.length;
|
|
64841
|
-
const sliced = source.slice(prefix.length, length);
|
|
64842
|
-
|
|
64843
|
-
return maybeNewline(removeBlankLines$1(sliced));
|
|
64844
|
-
};
|
|
64845
|
-
|
|
64846
|
-
const isJSON = (source) => {
|
|
64847
|
-
for (const type of TYPES) {
|
|
64848
|
-
if (!source.indexOf(type))
|
|
64849
|
-
return true;
|
|
64850
|
-
}
|
|
64851
|
-
|
|
64852
|
-
return false;
|
|
64853
|
-
};
|
|
64854
|
-
|
|
64855
|
-
var json = /*#__PURE__*/Object.freeze({
|
|
64856
|
-
__proto__: null,
|
|
64857
|
-
__filesystem: __filesystem,
|
|
64858
|
-
__filesystem_name: __filesystem_name$2,
|
|
64859
|
-
__ignore: __ignore,
|
|
64860
|
-
__ignore_name: __ignore_name,
|
|
64861
|
-
__json: __json,
|
|
64862
|
-
__json_name: __json_name,
|
|
64863
|
-
__toml: __toml,
|
|
64864
|
-
__toml_name: __toml_name,
|
|
64865
|
-
__yaml: __yaml,
|
|
64866
|
-
__yaml_name: __yaml_name,
|
|
64867
|
-
fromJS: fromJS,
|
|
64868
|
-
isJSON: isJSON,
|
|
64869
|
-
toJS: toJS
|
|
64870
|
-
});
|
|
64871
|
-
|
|
64872
64886
|
var require$$2 = /*@__PURE__*/getAugmentedNamespace(json);
|
|
64873
64887
|
|
|
64874
64888
|
var require$$1 = /*@__PURE__*/getAugmentedNamespace(operate);
|
|
@@ -65143,12 +65157,12 @@ const createTrackFile = (fileProgress) => function*(...a) {
|
|
|
65143
65157
|
};
|
|
65144
65158
|
|
|
65145
65159
|
const getTraverse = ({scan, rule, progress}) => ({push, options}) => ({
|
|
65146
|
-
[`${
|
|
65160
|
+
[`${__filesystem_name$2}(__)`](path) {
|
|
65147
65161
|
log(rule);
|
|
65148
65162
|
progress.start(rule);
|
|
65149
65163
|
|
|
65150
65164
|
const rootPath = path.get('arguments.0');
|
|
65151
|
-
const isSimple = fullstore
|
|
65165
|
+
const isSimple = fullstore(false);
|
|
65152
65166
|
|
|
65153
65167
|
const fileProgress = createFileProgress({
|
|
65154
65168
|
rule,
|
|
@@ -65214,18 +65228,18 @@ function runSimple(plugin, {path, isSimple, shouldConvert = true}) {
|
|
|
65214
65228
|
}
|
|
65215
65229
|
|
|
65216
65230
|
function parseVisitor(visitors) {
|
|
65217
|
-
const to = visitors[`${
|
|
65218
|
-
const from = visitors[`${
|
|
65231
|
+
const to = visitors[`${__filesystem_name$2}(__object)`];
|
|
65232
|
+
const from = visitors[`${__filesystem_name$2}(__array)`];
|
|
65219
65233
|
|
|
65220
65234
|
if (to)
|
|
65221
65235
|
return [
|
|
65222
65236
|
to,
|
|
65223
|
-
`${
|
|
65237
|
+
`${__filesystem_name$2}(__object)`,
|
|
65224
65238
|
];
|
|
65225
65239
|
|
|
65226
65240
|
return [
|
|
65227
65241
|
from,
|
|
65228
|
-
`${
|
|
65242
|
+
`${__filesystem_name$2}(__array)`,
|
|
65229
65243
|
];
|
|
65230
65244
|
}
|
|
65231
65245
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/bundle",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
6
6
|
"description": "🐊Putout bundle suitable for Deno and Browsers",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"hermes-parser": "^0.33.0",
|
|
64
64
|
"madrun": "^12.0.0",
|
|
65
65
|
"nodemon": "^3.0.1",
|
|
66
|
-
"putout": "^41.6.
|
|
66
|
+
"putout": "^41.6.4",
|
|
67
67
|
"rollup": "^4.24.2",
|
|
68
68
|
"rollup-plugin-node-externals": "^8.0.0",
|
|
69
69
|
"rollup-plugin-polyfill-node": "^0.13.0",
|