-
-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: remove .cjs dependency (#5956)
- Loading branch information
Showing
29 changed files
with
92 additions
and
79 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
packages/cspell/fixtures/features/file-list/files-to-check-missing.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
missing-file.txt | ||
../../../src/app/app.ts | ||
../../../src/app/app.mts | ||
../../../README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// This file is generated by tools/patch-version.mjs | ||
import { fileURLToPath } from 'node:url'; | ||
|
||
declare const __dirname: string; | ||
|
||
let _dirname: string; | ||
|
||
try { | ||
if (typeof import.meta.url !== 'string') throw new Error('assert'); | ||
_dirname = fileURLToPath(new URL('.', import.meta.url)); | ||
} catch { | ||
_dirname = __dirname; | ||
} | ||
|
||
export const pkgDir = _dirname; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/cspell/src/app/index.ts → packages/cspell/src/app/index.mts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// This file is generated by tools/patch-version.mjs | ||
|
||
export { pkgDir } from './dirname.js'; | ||
|
||
export const name = 'cspell'; | ||
export const version = '8.11.0'; | ||
export const engines = { node: '>=18' }; | ||
|
||
export const npmPackage = { name, version, engines }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
packages/cspell/src/lib/file-entry-cache.cts → ...l/src/app/util/cache/file-entry-cache.mts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { promises as fs } from 'node:fs'; | ||
|
||
const urlPackageJson = new URL('../package.json', import.meta.url); | ||
const urlVersionFile = new URL('../src/app/pkgInfo.ts', import.meta.url); | ||
|
||
async function readPackageJson() { | ||
const pkgJson = await fs.readFile(urlPackageJson, 'utf8'); | ||
return JSON.parse(pkgJson); | ||
} | ||
|
||
async function writeVersionFile(pkgJson) { | ||
const fileContent = `\ | ||
// This file is generated by tools/patch-version.mjs | ||
export { pkgDir } from './dirname.js'; | ||
export const name = '${pkgJson.name}'; | ||
export const version = '${pkgJson.version}'; | ||
export const engines = { node: '${pkgJson.engines.node}' }; | ||
export const npmPackage = { name, version, engines }; | ||
`; | ||
await fs.writeFile(urlVersionFile, fileContent); | ||
} | ||
|
||
async function run() { | ||
const pkgJson = await readPackageJson(); | ||
await writeVersionFile(pkgJson); | ||
} | ||
|
||
await run(); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
{ | ||
"files": [], | ||
"references": [{ "path": "./tsconfig.esm.json" }, { "path": "./src/lib/tsconfig.json" }] | ||
"extends": "../../tsconfig.esm.json", | ||
"compilerOptions": { | ||
"rootDir": "src/app", | ||
"outDir": "dist/esm", | ||
"target": "es2022", | ||
"lib": ["es2023"], | ||
"types": ["node"] | ||
}, | ||
"include": ["src/app"] | ||
} |