@naturalcycles/dev-lib 13.34.0 → 13.35.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.
@@ -5,12 +5,12 @@
5
5
  */
6
6
 
7
7
  // detect if jest is installed
8
- const hasJest = require('fs').existsSync('./node_modules/jest')
8
+ const hasJest = require('node:fs').existsSync('./node_modules/jest')
9
9
  // console.log({hasJest})
10
10
 
11
11
  module.exports = {
12
12
  env: {
13
- es2020: true,
13
+ es2024: true,
14
14
  node: true,
15
15
  jest: true,
16
16
  // 'jest/globals': true,
@@ -3,12 +3,14 @@
3
3
  * Extendable.
4
4
  */
5
5
 
6
- const fs = require('fs')
6
+ const fs = require('node:fs')
7
7
 
8
- const runInIDE = process.argv.includes('--runTestsByPath')
8
+ const runInIDE = process.argv.some(
9
+ a => a === '--runTestsByPath' || a.startsWith('--testNamePattern='),
10
+ )
9
11
  const ideIntegrationTest = runInIDE && process.argv.some(a => a.endsWith('.integration.test.ts'))
10
12
  const ideManualTest = runInIDE && process.argv.some(a => a.endsWith('.manual.test.ts'))
11
- const { CI } = process.env
13
+ const { CI, GITHUB_ACTIONS } = process.env
12
14
  const cwd = process.cwd()
13
15
 
14
16
  // Set 'setupFilesAfterEnv' only if it exists
@@ -131,6 +133,7 @@ module.exports = {
131
133
  ancestorSeparator: ' ',
132
134
  },
133
135
  ],
136
+ GITHUB_ACTIONS && 'github-actions', // https://jestjs.io/blog/2022/04/25/jest-28#github-actions-reporter
134
137
  ].filter(Boolean),
135
138
  prettierPath: null, // todo: remove when jest has fixed it https://github.com/jestjs/jest/issues/14305
136
139
  }
@@ -3,8 +3,8 @@
3
3
  * Extendable.
4
4
  */
5
5
 
6
- const fs = require('fs')
7
- const { CI } = process.env
6
+ const fs = require('node:fs')
7
+ const { CI, GITHUB_ACTIONS } = process.env
8
8
  const cwd = process.cwd()
9
9
 
10
10
  // Set 'setupFilesAfterEnv' only if it exists
@@ -36,5 +36,6 @@ module.exports = {
36
36
  ancestorSeparator: ' ',
37
37
  },
38
38
  ],
39
+ GITHUB_ACTIONS && 'github-actions',
39
40
  ].filter(Boolean),
40
41
  }
@@ -3,7 +3,7 @@
3
3
  * Extendable.
4
4
  */
5
5
 
6
- const fs = require('fs')
6
+ const fs = require('node:fs')
7
7
  const cwd = process.cwd()
8
8
 
9
9
  // Set 'setupFilesAfterEnv' only if it exists
@@ -5,7 +5,7 @@
5
5
  */
6
6
 
7
7
  const micromatch = require('micromatch')
8
- const fs = require('fs')
8
+ const fs = require('node:fs')
9
9
  const {
10
10
  prettierDirs,
11
11
  prettierExtensionsExclusive,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturalcycles/dev-lib",
3
- "version": "13.34.0",
3
+ "version": "13.35.1",
4
4
  "scripts": {
5
5
  "prepare": "husky install",
6
6
  "tsn-debug": "tsn testScript.ts",