@m2c2kit/build-helpers 0.3.29 → 0.3.30

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.
Files changed (2) hide show
  1. package/dist/index.js +49 -16
  2. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -7331,11 +7331,14 @@ function requireNodeModulesPaths () {
7331
7331
  var path = path$3;
7332
7332
  var parse = path.parse || requirePathParse(); // eslint-disable-line global-require
7333
7333
 
7334
+ var driveLetterRegex = /^([A-Za-z]:)/;
7335
+ var uncPathRegex = /^\\\\/;
7336
+
7334
7337
  var getNodeModulesDirs = function getNodeModulesDirs(absoluteStart, modules) {
7335
7338
  var prefix = '/';
7336
- if ((/^([A-Za-z]:)/).test(absoluteStart)) {
7339
+ if (driveLetterRegex.test(absoluteStart)) {
7337
7340
  prefix = '';
7338
- } else if ((/^\\\\/).test(absoluteStart)) {
7341
+ } else if (uncPathRegex.test(absoluteStart)) {
7339
7342
  prefix = '\\\\';
7340
7343
  }
7341
7344
 
@@ -8051,6 +8054,10 @@ function requireAsync$6 () {
8051
8054
 
8052
8055
  var realpathFS = process.platform !== 'win32' && fs.realpath && typeof fs.realpath.native === 'function' ? fs.realpath.native : fs.realpath;
8053
8056
 
8057
+ var relativePathRegex = /^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/;
8058
+ var windowsDriveRegex = /^\w:[/\\]*$/;
8059
+ var nodeModulesRegex = /[/\\]node_modules[/\\]*$/;
8060
+
8054
8061
  var homedir = getHomedir();
8055
8062
  var defaultPaths = function () {
8056
8063
  return [
@@ -8167,10 +8174,10 @@ function requireAsync$6 () {
8167
8174
 
8168
8175
  var res;
8169
8176
  function init(basedir) {
8170
- if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) {
8177
+ if (relativePathRegex.test(x)) {
8171
8178
  res = path.resolve(basedir, x);
8172
8179
  if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/';
8173
- if ((/\/$/).test(x) && res === basedir) {
8180
+ if (x.slice(-1) === '/' && res === basedir) {
8174
8181
  loadAsDirectory(res, opts.package, onfile);
8175
8182
  } else loadAsFile(res, opts.package, onfile);
8176
8183
  } else if (includeCoreModules && isCore(x)) {
@@ -8258,10 +8265,10 @@ function requireAsync$6 () {
8258
8265
 
8259
8266
  function loadpkg(dir, cb) {
8260
8267
  if (dir === '' || dir === '/') return cb(null);
8261
- if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) {
8268
+ if (process.platform === 'win32' && windowsDriveRegex.test(dir)) {
8262
8269
  return cb(null);
8263
8270
  }
8264
- if ((/[/\\]node_modules[/\\]*$/).test(dir)) return cb(null);
8271
+ if (nodeModulesRegex.test(dir)) return cb(null);
8265
8272
 
8266
8273
  maybeRealpath(realpath, dir, opts, function (unwrapErr, pkgdir) {
8267
8274
  if (unwrapErr) return loadpkg(path.dirname(dir), cb);
@@ -8654,7 +8661,10 @@ var require$$1 = {
8654
8661
  ">= 21.7"
8655
8662
  ],
8656
8663
  smalloc: smalloc,
8657
- "node:sqlite": ">= 23.4",
8664
+ "node:sqlite": [
8665
+ ">= 22.13 && < 23",
8666
+ ">= 23.4"
8667
+ ],
8658
8668
  _stream_duplex: _stream_duplex,
8659
8669
  "node:_stream_duplex": [
8660
8670
  ">= 14.18 && < 15",
@@ -8865,6 +8875,10 @@ function requireSync$6 () {
8865
8875
 
8866
8876
  var realpathFS = process.platform !== 'win32' && fs.realpathSync && typeof fs.realpathSync.native === 'function' ? fs.realpathSync.native : fs.realpathSync;
8867
8877
 
8878
+ var relativePathRegex = /^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/;
8879
+ var windowsDriveRegex = /^\w:[/\\]*$/;
8880
+ var nodeModulesRegex = /[/\\]node_modules[/\\]*$/;
8881
+
8868
8882
  var homedir = getHomedir();
8869
8883
  var defaultPaths = function () {
8870
8884
  return [
@@ -8953,7 +8967,7 @@ function requireSync$6 () {
8953
8967
  // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory
8954
8968
  var absoluteStart = maybeRealpathSync(realpathSync, path.resolve(basedir), opts);
8955
8969
 
8956
- if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) {
8970
+ if (relativePathRegex.test(x)) {
8957
8971
  var res = path.resolve(absoluteStart, x);
8958
8972
  if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/';
8959
8973
  var m = loadAsFileSync(res) || loadAsDirectorySync(res);
@@ -8994,10 +9008,10 @@ function requireSync$6 () {
8994
9008
 
8995
9009
  function loadpkg(dir) {
8996
9010
  if (dir === '' || dir === '/') return;
8997
- if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) {
9011
+ if (process.platform === 'win32' && windowsDriveRegex.test(dir)) {
8998
9012
  return;
8999
9013
  }
9000
- if ((/[/\\]node_modules[/\\]*$/).test(dir)) return;
9014
+ if (nodeModulesRegex.test(dir)) return;
9001
9015
 
9002
9016
  var pkgfile = path.join(maybeRealpathSync(realpathSync, dir, opts), 'package.json');
9003
9017
 
@@ -20341,6 +20355,10 @@ function requireIdentifiers () {
20341
20355
 
20342
20356
  const numeric = /^[0-9]+$/;
20343
20357
  const compareIdentifiers = (a, b) => {
20358
+ if (typeof a === 'number' && typeof b === 'number') {
20359
+ return a === b ? 0 : a < b ? -1 : 1
20360
+ }
20361
+
20344
20362
  const anum = numeric.test(a);
20345
20363
  const bnum = numeric.test(b);
20346
20364
 
@@ -20483,11 +20501,25 @@ function requireSemver$1 () {
20483
20501
  other = new SemVer(other, this.options);
20484
20502
  }
20485
20503
 
20486
- return (
20487
- compareIdentifiers(this.major, other.major) ||
20488
- compareIdentifiers(this.minor, other.minor) ||
20489
- compareIdentifiers(this.patch, other.patch)
20490
- )
20504
+ if (this.major < other.major) {
20505
+ return -1
20506
+ }
20507
+ if (this.major > other.major) {
20508
+ return 1
20509
+ }
20510
+ if (this.minor < other.minor) {
20511
+ return -1
20512
+ }
20513
+ if (this.minor > other.minor) {
20514
+ return 1
20515
+ }
20516
+ if (this.patch < other.patch) {
20517
+ return -1
20518
+ }
20519
+ if (this.patch > other.patch) {
20520
+ return 1
20521
+ }
20522
+ return 0
20491
20523
  }
20492
20524
 
20493
20525
  comparePre (other) {
@@ -21508,6 +21540,7 @@ function requireRange () {
21508
21540
  // already replaced the hyphen ranges
21509
21541
  // turn into a set of JUST comparators.
21510
21542
  const parseComparator = (comp, options) => {
21543
+ comp = comp.replace(re[t.BUILD], '');
21511
21544
  debug('comp', comp, options);
21512
21545
  comp = replaceCarets(comp, options);
21513
21546
  debug('caret', comp);
@@ -26593,7 +26626,7 @@ function replace(options) {
26593
26626
  if ( options === void 0 ) options = {};
26594
26627
 
26595
26628
  var filter = createFilter(options.include, options.exclude);
26596
- var delimiters = options.delimiters; if ( delimiters === void 0 ) delimiters = ['\\b', '\\b(?!\\.)'];
26629
+ var delimiters = options.delimiters; if ( delimiters === void 0 ) delimiters = ['(?<![_$a-zA-Z0-9\\xA0-\\uFFFF])', '(?![_$a-zA-Z0-9\\xA0-\\uFFFF])(?!\\.)'];
26597
26630
  var preventAssignment = options.preventAssignment;
26598
26631
  var objectGuards = options.objectGuards;
26599
26632
  var replacements = getReplacements(options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m2c2kit/build-helpers",
3
- "version": "0.3.29",
3
+ "version": "0.3.30",
4
4
  "description": "Utility functions for building m2c2kit apps",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -15,23 +15,23 @@
15
15
  "dist/index.d.ts"
16
16
  ],
17
17
  "devDependencies": {
18
- "@rollup/plugin-commonjs": "28.0.6",
18
+ "@rollup/plugin-commonjs": "28.0.9",
19
19
  "@rollup/plugin-json": "6.1.0",
20
- "@rollup/plugin-node-resolve": "16.0.2",
21
- "@rollup/plugin-replace": "6.0.2",
20
+ "@rollup/plugin-node-resolve": "16.0.3",
21
+ "@rollup/plugin-replace": "6.0.3",
22
22
  "@types/findup-sync": "4.0.5",
23
23
  "@types/fs-extra": "11.0.4",
24
24
  "@types/semver": "7.7.1",
25
25
  "cpy": "10.1.0",
26
26
  "findup-sync": "5.0.0",
27
27
  "fs-extra": "11.3.2",
28
- "magic-string": "0.30.19",
28
+ "magic-string": "0.30.21",
29
29
  "rimraf": "6.0.1",
30
- "rollup": "4.52.4",
30
+ "rollup": "4.52.5",
31
31
  "rollup-plugin-copy": "3.5.0",
32
32
  "rollup-plugin-dts": "6.2.3",
33
33
  "rollup-plugin-esbuild": "6.2.1",
34
- "semver": "7.7.2",
34
+ "semver": "7.7.3",
35
35
  "typescript": "5.9.3"
36
36
  },
37
37
  "scripts": {
@@ -57,7 +57,7 @@
57
57
  "domhandler": "5.0.3",
58
58
  "find-up": "8.0.0",
59
59
  "htmlparser2": "10.0.0",
60
- "resolve": "1.22.10"
60
+ "resolve": "1.22.11"
61
61
  },
62
62
  "engines": {
63
63
  "node": ">=18"