@vxrn/resolve 1.17.6 → 1.17.9-1779398888939

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vxrn/resolve",
3
- "version": "1.17.6",
3
+ "version": "1.17.9-1779398888939",
4
4
  "sideEffects": false,
5
5
  "source": "src/index.tsx",
6
6
  "type": "module",
package/src/index.test.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { describe, expect, it } from 'vitest'
2
2
  import { resolvePath } from './index'
3
3
  import { existsSync } from 'node:fs'
4
+ import { join } from 'node:path'
4
5
 
5
6
  describe('resolvePath', () => {
6
7
  describe('basic resolution', () => {
@@ -24,9 +25,8 @@ describe('resolvePath', () => {
24
25
 
25
26
  describe('respects from parameter', () => {
26
27
  it('resolves relative paths from specified directory', () => {
27
- // Use process.cwd() which is the repo root when running tests
28
28
  const path = resolvePath('./package.json', process.cwd())
29
- expect(path).toBe(process.cwd() + '/package.json')
29
+ expect(path).toBe(join(process.cwd(), 'package.json'))
30
30
  expect(existsSync(path)).toBe(true)
31
31
  })
32
32
 
@@ -47,7 +47,7 @@ describe('resolvePath', () => {
47
47
  it('returns ESM entry when exports["."].import.default exists', () => {
48
48
  // vitest has nested structure: { import: { types: "...", default: "..." } }
49
49
  const path = resolvePath('vitest', process.cwd())
50
- expect(path).toContain('dist/index.js')
50
+ expect(path).toContain(join('dist', 'index.js'))
51
51
  expect(path).not.toContain('.cjs')
52
52
  })
53
53