js-build-tools 4.1.0 → 4.1.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.
@@ -67,8 +67,16 @@ const tsFor = (srcPath = gulpConfig.get('typescript.from'), distPath = gulpConfi
67
67
  return () => {};
68
68
  }
69
69
  const configPath = gulpConfig.get('typescript.config');
70
+ // When no tsconfig.json is configured, target/module are pinned explicitly rather than left for TypeScript's
71
+ // own compiler defaults - those defaults have already shifted once across a TypeScript version bump in this
72
+ // project's own history (silently changing whether output keeps `const`/`let` or downlevels to `var`), and
73
+ // pinning them keeps this task's output stable across future TypeScript upgrades too. ES5/CommonJS matches
74
+ // what the downstream babel/browserify bundling pipeline has always assumed it receives.
70
75
  const compilerOptions = configPath ? readCompilerOptions(configPath) : {
71
- declaration: true
76
+ declaration: true,
77
+ target: _typescript.default.ScriptTarget.ES5,
78
+ module: _typescript.default.ModuleKind.CommonJS,
79
+ esModuleInterop: false
72
80
  };
73
81
  // Accepts gulp's own callback-style task convention (an optional `done`, called once finished) rather than
74
82
  // just returning a Promise, since callers may invoke the returned function directly with a callback instead
package/dist/testFull.js CHANGED
@@ -1,26 +1,25 @@
1
- 'use strict'
2
-
3
- require('core-js/modules/esnext.weak-map.delete-all.js')
4
- Object.defineProperty(exports, '__esModule', {
5
- value: true
6
- })
7
- exports.testFull = void 0
8
- var gulpConfig = _interopRequireWildcard(require('../gulp.config.js'))
9
- var _jest = _interopRequireDefault(require('jest'))
10
- function _interopRequireDefault (e) { return e && e.__esModule ? e : { default: e } }
11
- function _interopRequireWildcard (e, t) { if (typeof WeakMap === 'function') var r = new WeakMap(); var n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o; var i; var f = { __proto__: null, default: e }; if (e === null || typeof e !== 'object' && typeof e !== 'function') return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f) } for (const t in e) t !== 'default' && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f })(e, t) }
1
+ 'use strict'
2
+
3
+ require('core-js/modules/esnext.weak-map.delete-all.js')
4
+ Object.defineProperty(exports, '__esModule', {
5
+ value: true
6
+ })
7
+ exports.testFull = void 0
8
+ var gulpConfig = _interopRequireWildcard(require('../gulp.config.js'))
9
+ var _jest = require('jest')
10
+ function _interopRequireWildcard (e, t) { if (typeof WeakMap === 'function') var r = new WeakMap(); var n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o; var i; var f = { __proto__: null, default: e }; if (e === null || typeof e !== 'object' && typeof e !== 'function') return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f) } for (const t in e) t !== 'default' && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f })(e, t) }
12
11
  /**
13
12
  * Run all tests with jest.
14
13
  * Configure where tests are located by using 'testPath'.
15
14
  * @memberOf module:js-build-tools
16
15
  * @returns {Promise<*>}
17
- */
18
- const testFull = () => {
19
- let testPath = gulpConfig.get('test.path')
20
- if (!Array.isArray(testPath)) {
21
- // The testPath must be an array of strings
22
- testPath = [testPath]
23
- }
24
- return _jest.default.runCLI(gulpConfig.get('test.options'), testPath)
25
- }
26
- exports.testFull = testFull
16
+ */
17
+ const testFull = () => {
18
+ let testPath = gulpConfig.get('test.path')
19
+ if (!Array.isArray(testPath)) {
20
+ // The testPath must be an array of strings
21
+ testPath = [testPath]
22
+ }
23
+ return (0, _jest.runCLI)(gulpConfig.get('test.options'), testPath)
24
+ }
25
+ exports.testFull = testFull
@@ -1 +1 @@
1
- "use strict";require("core-js/modules/esnext.weak-map.delete-all.js"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.testFull=void 0;var gulpConfig=_interopRequireWildcard(require("../gulp.config.js")),_jest=_interopRequireDefault(require("jest"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap,u=new WeakMap;return(_interopRequireWildcard=function(e,t){if(!t&&e&&e.__esModule)return e;var n,o,i={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return i;if(n=t?u:r){if(n.has(e))return n.get(e);n.set(e,i)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((o=(n=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(o.get||o.set)?n(i,t,o):i[t]=e[t]);return i})(e,t)}const testFull=()=>{let e=gulpConfig.get("test.path");return Array.isArray(e)||(e=[e]),_jest.default.runCLI(gulpConfig.get("test.options"),e)};exports.testFull=testFull;
1
+ "use strict";require("core-js/modules/esnext.weak-map.delete-all.js"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.testFull=void 0;var gulpConfig=_interopRequireWildcard(require("../gulp.config.js")),_jest=require("jest");function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(_interopRequireWildcard=function(e,t){if(!t&&e&&e.__esModule)return e;var o,u,i={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return i;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,i)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((u=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(u.get||u.set)?o(i,t,u):i[t]=e[t]);return i})(e,t)}const testFull=()=>{let e=gulpConfig.get("test.path");return Array.isArray(e)||(e=[e]),(0,_jest.runCLI)(gulpConfig.get("test.options"),e)};exports.testFull=testFull;
package/dist/testQuick.js CHANGED
@@ -1,28 +1,27 @@
1
- 'use strict'
2
-
3
- require('core-js/modules/esnext.weak-map.delete-all.js')
4
- Object.defineProperty(exports, '__esModule', {
5
- value: true
6
- })
7
- exports.testQuick = void 0
8
- var gulpConfig = _interopRequireWildcard(require('../gulp.config.js'))
9
- var _jest = _interopRequireDefault(require('jest'))
10
- function _interopRequireDefault (e) { return e && e.__esModule ? e : { default: e } }
11
- function _interopRequireWildcard (e, t) { if (typeof WeakMap === 'function') var r = new WeakMap(); var n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o; var i; var f = { __proto__: null, default: e }; if (e === null || typeof e !== 'object' && typeof e !== 'function') return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f) } for (const t in e) t !== 'default' && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f })(e, t) }
1
+ 'use strict'
2
+
3
+ require('core-js/modules/esnext.weak-map.delete-all.js')
4
+ Object.defineProperty(exports, '__esModule', {
5
+ value: true
6
+ })
7
+ exports.testQuick = void 0
8
+ var gulpConfig = _interopRequireWildcard(require('../gulp.config.js'))
9
+ var _jest = require('jest')
10
+ function _interopRequireWildcard (e, t) { if (typeof WeakMap === 'function') var r = new WeakMap(); var n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o; var i; var f = { __proto__: null, default: e }; if (e === null || typeof e !== 'object' && typeof e !== 'function') return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f) } for (const t in e) t !== 'default' && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f })(e, t) }
12
11
  /**
13
12
  * Run the Jest tests for files which have been modified (based on git status).
14
13
  * Configure where tests are located by using 'testPath'.
15
14
  * @memberOf module:js-build-tools
16
15
  * @returns {Promise<*>}
17
- */
18
- const testQuick = () => {
19
- let testPath = gulpConfig.get('test.path')
20
- if (!Array.isArray(testPath)) {
21
- // The testPath must be an array of strings
22
- testPath = [testPath]
23
- }
24
- return _jest.default.runCLI({
25
- onlyChanged: true
26
- }, testPath)
27
- }
28
- exports.testQuick = testQuick
16
+ */
17
+ const testQuick = () => {
18
+ let testPath = gulpConfig.get('test.path')
19
+ if (!Array.isArray(testPath)) {
20
+ // The testPath must be an array of strings
21
+ testPath = [testPath]
22
+ }
23
+ return (0, _jest.runCLI)({
24
+ onlyChanged: true
25
+ }, testPath)
26
+ }
27
+ exports.testQuick = testQuick
@@ -1 +1 @@
1
- "use strict";require("core-js/modules/esnext.weak-map.delete-all.js"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.testQuick=void 0;var gulpConfig=_interopRequireWildcard(require("../gulp.config.js")),_jest=_interopRequireDefault(require("jest"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap,u=new WeakMap;return(_interopRequireWildcard=function(e,t){if(!t&&e&&e.__esModule)return e;var i,n,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(i=t?u:r){if(i.has(e))return i.get(e);i.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((n=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(n.get||n.set)?i(o,t,n):o[t]=e[t]);return o})(e,t)}const testQuick=()=>{let e=gulpConfig.get("test.path");return Array.isArray(e)||(e=[e]),_jest.default.runCLI({onlyChanged:!0},e)};exports.testQuick=testQuick;
1
+ "use strict";require("core-js/modules/esnext.weak-map.delete-all.js"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.testQuick=void 0;var gulpConfig=_interopRequireWildcard(require("../gulp.config.js")),_jest=require("jest");function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap,i=new WeakMap;return(_interopRequireWildcard=function(e,t){if(!t&&e&&e.__esModule)return e;var n,o,u={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return u;if(n=t?i:r){if(n.has(e))return n.get(e);n.set(e,u)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((o=(n=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(o.get||o.set)?n(u,t,o):u[t]=e[t]);return u})(e,t)}const testQuick=()=>{let e=gulpConfig.get("test.path");return Array.isArray(e)||(e=[e]),(0,_jest.runCLI)({onlyChanged:!0},e)};exports.testQuick=testQuick;
@@ -61,7 +61,14 @@ export const tsFor = (
61
61
  return () => {}
62
62
  }
63
63
  const configPath = gulpConfig.get('typescript.config')
64
- const compilerOptions = configPath ? readCompilerOptions(configPath) : { declaration: true }
64
+ // When no tsconfig.json is configured, target/module are pinned explicitly rather than left for TypeScript's
65
+ // own compiler defaults - those defaults have already shifted once across a TypeScript version bump in this
66
+ // project's own history (silently changing whether output keeps `const`/`let` or downlevels to `var`), and
67
+ // pinning them keeps this task's output stable across future TypeScript upgrades too. ES5/CommonJS matches
68
+ // what the downstream babel/browserify bundling pipeline has always assumed it receives.
69
+ const compilerOptions = configPath
70
+ ? readCompilerOptions(configPath)
71
+ : { declaration: true, target: ts.ScriptTarget.ES5, module: ts.ModuleKind.CommonJS, esModuleInterop: false }
65
72
  // Accepts gulp's own callback-style task convention (an optional `done`, called once finished) rather than
66
73
  // just returning a Promise, since callers may invoke the returned function directly with a callback instead
67
74
  // of relying on gulp's own runner to observe a returned Promise.
@@ -1,5 +1,5 @@
1
1
  import * as gulpConfig from '../gulp.config.mjs'
2
- import { default as jest } from 'jest'
2
+ import { runCLI } from 'jest'
3
3
 
4
4
  /**
5
5
  * Run all tests with jest.
@@ -13,5 +13,5 @@ export const testFull = () => {
13
13
  // The testPath must be an array of strings
14
14
  testPath = [testPath]
15
15
  }
16
- return jest.runCLI(gulpConfig.get('test.options'), testPath)
16
+ return runCLI(gulpConfig.get('test.options'), testPath)
17
17
  }
@@ -1,5 +1,5 @@
1
1
  import { testHelpers } from './testHelpers.mjs'
2
- import { default as jestImport } from 'jest'
2
+ import { runCLI } from 'jest'
3
3
  import { testFull } from './testFull.mjs'
4
4
 
5
5
  const gulpConfig = testHelpers.gulpConfig
@@ -12,6 +12,6 @@ describe('testFull', () => {
12
12
  test('runs the Jest CLI with the configured options', () => {
13
13
  expect.assertions(1)
14
14
  testFull()
15
- expect(jestImport.runCLI).toHaveBeenCalledWith(gulpConfig.get('test.options'), [gulpConfig.get('test.path')])
15
+ expect(runCLI).toHaveBeenCalledWith(gulpConfig.get('test.options'), [gulpConfig.get('test.path')])
16
16
  })
17
17
  })
@@ -1,5 +1,5 @@
1
1
  import * as gulpConfig from '../gulp.config.mjs'
2
- import { default as jest } from 'jest'
2
+ import { runCLI } from 'jest'
3
3
 
4
4
  /**
5
5
  * Run the Jest tests for files which have been modified (based on git status).
@@ -13,5 +13,5 @@ export const testQuick = () => {
13
13
  // The testPath must be an array of strings
14
14
  testPath = [testPath]
15
15
  }
16
- return jest.runCLI({ onlyChanged: true }, testPath)
16
+ return runCLI({ onlyChanged: true }, testPath)
17
17
  }
@@ -1,5 +1,5 @@
1
1
  import { testHelpers } from './testHelpers.mjs'
2
- import { default as jestImport } from 'jest'
2
+ import { runCLI } from 'jest'
3
3
  import { testQuick } from './testQuick.mjs'
4
4
 
5
5
  const gulpConfig = testHelpers.gulpConfig
@@ -12,6 +12,6 @@ describe('testQuick', () => {
12
12
  test('runs the jest CLI with onlyChanged option', () => {
13
13
  expect.assertions(1)
14
14
  testQuick()
15
- expect(jestImport.runCLI).toHaveBeenCalledWith({ onlyChanged: true }, [gulpConfig.get('test.path')])
15
+ expect(runCLI).toHaveBeenCalledWith({ onlyChanged: true }, [gulpConfig.get('test.path')])
16
16
  })
17
17
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "js-build-tools",
3
- "version": "4.1.0",
3
+ "version": "4.1.1",
4
4
  "description": "Standardised build process with gulp.",
5
5
  "main": "gulpfile.base.js",
6
6
  "exports": {
@@ -50,7 +50,7 @@
50
50
  "@babel/plugin-transform-modules-commonjs": "^7.29.7",
51
51
  "@babel/preset-env": "^7.29.7",
52
52
  "@babel/preset-typescript": "^7.29.7",
53
- "@babel/runtime-corejs3": "^7.29.7",
53
+ "@babel/runtime-corejs3": "^8.0.6",
54
54
  "babel-jest": "^30.4.1",
55
55
  "browserify": "^17.0.1",
56
56
  "core-js": "^3.49.0",
@@ -65,12 +65,12 @@
65
65
  "gulp-standard": "^14.0.0",
66
66
  "gulp-ts-compile": "^1.0.0",
67
67
  "gulp-uglify-es": "^3.0.0",
68
- "jest": "^29.7.0",
68
+ "jest": "^30.5.2",
69
69
  "jest-environment-jsdom": "^30.4.1",
70
70
  "jsdoc-to-markdown": "^9.1.3",
71
71
  "regenerator-runtime": "^0.14.1",
72
72
  "sass": "^1.101.0",
73
- "test-filesystem": "^1.4.0",
73
+ "test-filesystem": "^1.5.0",
74
74
  "through2": "^4.0.2",
75
75
  "vinyl-source-stream": "^2.0.0"
76
76
  },
@@ -86,6 +86,6 @@
86
86
  ],
87
87
  "funding": "https://www.paypal.com/donate/?business=LRYR6SZRWKXVY&no_recurring=0&item_name=Let%27s+build+together+today+to+simplify+our+jobs+tomorrow.&currency_code=CAD",
88
88
  "devDependencies": {
89
- "typescript": "5.9.2"
89
+ "typescript": "^6.0.3"
90
90
  }
91
91
  }