Skip to content

Commit a529720

Browse files
committed
Use LATEST constant
1 parent 2667546 commit a529720

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.config/rollup.base.config.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { readPackageUpSync } from 'read-package-up'
1010
import rangesIntersect from 'semver/ranges/intersects.js'
1111
import { purgePolyfills } from 'unplugin-purge-polyfills'
1212

13+
import constants from '@socketsecurity/registry/lib/constants'
1314
import { isRelative } from '@socketsecurity/registry/lib/path'
1415
import { escapeRegExp } from '@socketsecurity/registry/lib/regexps'
1516
import {
@@ -27,6 +28,8 @@ import {
2728
resolveId
2829
} from '../scripts/utils/packages.js'
2930

31+
const { LATEST } = constants
32+
3033
const __dirname = fileURLToPath(new URL('.', import.meta.url))
3134
const require = createRequire(import.meta.url)
3235

@@ -140,7 +143,7 @@ export default (extendConfig = {}) => {
140143
parentPkg?.peerDependencies?.[name] ??
141144
readPackageUpSync({ cwd: path.dirname(resolvedId) })?.packageJson
142145
?.version ??
143-
'latest'
146+
LATEST
144147
return false
145148
}
146149
const parentNodeModulesIndex = parentId.lastIndexOf(

eslint.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const unicornPlugin = require('eslint-plugin-unicorn')
1212
const tsEslint = require('typescript-eslint')
1313

1414
const constants = require('@socketsecurity/registry/lib/constants')
15-
const { GIT_IGNORE, PRETTIER_IGNORE, TSCONFIG_JSON } = constants
15+
const { GIT_IGNORE, LATEST, PRETTIER_IGNORE, TSCONFIG_JSON } = constants
1616

1717
const { flatConfigs: origImportXFlatConfigs } = importXPlugin
1818

@@ -44,7 +44,7 @@ const getImportXFlatConfigs = isEsm => ({
4444
...origImportXFlatConfigs.recommended,
4545
languageOptions: {
4646
...origImportXFlatConfigs.recommended.languageOptions,
47-
ecmaVersion: 'latest',
47+
ecmaVersion: LATEST,
4848
sourceType: isEsm ? 'module' : 'script'
4949
},
5050
rules: {

0 commit comments

Comments
 (0)