@naturalcycles/dev-lib 20.41.4 → 20.42.0

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/cfg/_cnst.js CHANGED
@@ -7,7 +7,7 @@ const prettierExtensionsAll =
7
7
  const eslintExtensions = 'ts,tsx,cts,mts,html'
8
8
  const stylelintExtensions = 'css,scss'
9
9
  const lintExclude = ['./**/__exclude/**', './**/dist/**', './**/cache/**', './CHANGELOG.md']
10
- const minActionlintVersion = '1.7.10'
10
+ const minActionlintVersion = '1.7.12'
11
11
 
12
12
  export {
13
13
  prettierDirs,
@@ -266,7 +266,7 @@ export default {
266
266
  'no-duplicate-imports': 0, // too many false-positives (with e.g import type + import on next line)
267
267
  'no-var': 2,
268
268
  'no-with': 2,
269
- 'object-shorthand': 2,
269
+ 'object-shorthand': 0, // ox
270
270
  'one-var': [2, 'never'],
271
271
  'prefer-const': [
272
272
  2,
@@ -76,6 +76,8 @@ export const sharedConfig = {
76
76
  'no-conditional-expect': 0,
77
77
  'expect-expect': 0,
78
78
  'no-disabled-tests': 0,
79
+ 'no-useless-assignment': 0, // buggy, gives false positives
80
+ 'object-shorthand': 2,
79
81
  'valid-expect': 0,
80
82
  'valid-title': 0,
81
83
  'valid-describe-callback': 0,
@@ -147,14 +149,17 @@ export const sharedConfig = {
147
149
  'oxc/misrefactored-assign-op': 2,
148
150
  'promise/spec-only': 2,
149
151
  'typescript/class-literal-property-style': 2,
152
+ 'typescript/consistent-type-exports': 2,
150
153
  'typescript/explicit-function-return-type': [2, { allowExpressions: true }],
151
154
  // "typescript/explicit-module-boundary-types": [2, {"allowArgumentsExplicitlyTypedAsAny": true}]
152
155
  'typescript/no-empty-object-type': [2, { allowInterfaces: 'always' }],
153
156
  'typescript/no-import-type-side-effects': 2,
157
+ 'typescript/dot-notation': 2,
154
158
  // "typescript/no-namespace": 2,
155
159
  'typescript/no-non-null-asserted-nullish-coalescing': 2,
156
160
  'typescript/no-require-imports': 2,
157
161
  'typescript/no-var-requires': 2,
162
+ 'typescript/no-unnecessary-type-conversion': 2,
158
163
  'typescript/no-unnecessary-template-expression': 2,
159
164
  'typescript/no-unnecessary-type-arguments': 0, // not good in the end
160
165
  'typescript/no-unnecessary-type-constraint': 2,
@@ -312,6 +317,7 @@ export const sharedConfig = {
312
317
  'unicorn/prefer-math-trunc': 2,
313
318
  'unicorn/prefer-includes': 2,
314
319
  'unicorn/prefer-response-static-json': 2,
320
+ 'unicorn/switch-case-break-position': 2,
315
321
  'import/no-named-default': 2,
316
322
  'import/consistent-type-specifier-style': 2,
317
323
  'unicorn/no-new-array': 0, // it's actually ok
@@ -370,6 +376,8 @@ export const sharedConfig = {
370
376
  'unicorn/prefer-string-raw': 2,
371
377
  'unicorn/prefer-string-trim-start-end': 2,
372
378
  'unicorn/prefer-type-error': 2,
379
+ 'unicorn/prefer-import-meta-properties': 2,
380
+ 'unicorn/no-useless-iterator-to-array': 2,
373
381
  'unicorn/require-array-join-separator': 2,
374
382
  'unicorn/switch-case-braces': [2, 'always'],
375
383
  'unicorn/text-encoding-identifier-case': [
@@ -408,6 +416,7 @@ export const sharedConfig = {
408
416
  'jest/max-nested-describe': [0, { max: 4 }], // not good
409
417
  'jest/no-alias-methods': 2,
410
418
  'jest/prefer-mock-return-shorthand': 2,
419
+ 'jest/prefer-snapshot-hint': 0, // annoying
411
420
  'vue/no-multiple-slot-args': 2,
412
421
  'vue/no-deprecated-destroyed-lifecycle': 2,
413
422
  'vue/define-emits-declaration': [2, 'type-based'],
@@ -20,7 +20,7 @@ export class SummaryReporter {
20
20
 
21
21
  console.log(' Slowest:')
22
22
  stats.forEach(({ name, ms }) => {
23
- console.log(String(_ms(ms)).padStart(10), name)
23
+ console.log(_ms(ms).padStart(10), name)
24
24
  })
25
25
  }
26
26
  }
@@ -10,7 +10,7 @@ const runsInIDE = doesItRunInIDE()
10
10
  const testType = getTestType(runsInIDE)
11
11
  const silent = shouldBeSilent(runsInIDE)
12
12
  const { include, exclude } = getIncludeAndExclude(testType)
13
- const isCI = !!process.env['CI']
13
+ const isCI = !!process.env.CI
14
14
  const coverageEnabled = isCI && testType === 'unit'
15
15
  const junitReporterEnabled = isCI && testType !== 'manual'
16
16
  const maxWorkers = getMaxWorkers()
@@ -22,11 +22,11 @@ const pool = 'threads'
22
22
  process.env.TZ ||= 'UTC'
23
23
 
24
24
  if (testType === 'unit') {
25
- process.env['APP_ENV'] = process.env['APP_ENV'] || 'test'
25
+ process.env.APP_ENV = process.env.APP_ENV || 'test'
26
26
  }
27
27
 
28
28
  if (silent) {
29
- process.env['TEST_SILENT'] = 'true'
29
+ process.env.TEST_SILENT = 'true'
30
30
  }
31
31
 
32
32
  /**
@@ -167,7 +167,7 @@ function getTestType(runsInIDE) {
167
167
  }
168
168
  }
169
169
 
170
- return process.env['TEST_TYPE'] || 'unit'
170
+ return process.env.TEST_TYPE || 'unit'
171
171
  }
172
172
 
173
173
  function shouldBeSilent(runsInIDE) {
@@ -228,6 +228,6 @@ function getIncludeAndExclude(testType) {
228
228
  }
229
229
 
230
230
  function getMaxWorkers() {
231
- const cpuLimit = Number(process.env['CPU_LIMIT'])
231
+ const cpuLimit = Number(process.env.CPU_LIMIT)
232
232
  return cpuLimit || undefined
233
233
  }
@@ -1 +1,2 @@
1
+ import type { UnixTimestamp } from '@naturalcycles/js-lib/types';
1
2
  export declare const MOCK_TS_2018_06_21: UnixTimestamp;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@naturalcycles/dev-lib",
3
3
  "type": "module",
4
- "version": "20.41.4",
4
+ "version": "20.42.0",
5
5
  "dependencies": {
6
6
  "prompts": "^2",
7
7
  "@naturalcycles/js-lib": "^15",
@@ -48,7 +48,7 @@
48
48
  "devDependencies": {
49
49
  "@types/node": "^25",
50
50
  "@types/prompts": "^2",
51
- "@typescript/native-preview": "7.0.0-dev.20260301.1"
51
+ "@typescript/native-preview": "7.0.0-dev.20260401.1"
52
52
  },
53
53
  "exports": {
54
54
  "./cfg/": "./cfg/",