Skip to content

Commit b1f4304

Browse files
committed
A few fixes
1 parent 239f70b commit b1f4304

File tree

7 files changed

+35
-18
lines changed

7 files changed

+35
-18
lines changed

commands/repos.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { fileExists, octokit } from '#common'
1313
import { collectGitHubRepositories, collectGitHubRepositories2 } from '#utilities/repositories.ts'
1414
import type { Octokit } from 'octokit'
1515
import { getEcosystems } from '../devutils/index.ts'
16+
import { CommandScriptOptions } from '#types'
1617
import process from 'node:process'
1718

1819
type Config = {

commands/task.ts

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -298,12 +298,12 @@ async function createVSCodeLaunchers(positionals: string[]) {
298298
const dataDir = (Deno.env.get('XDG_DATA_HOME') ?? '').startsWith('/')
299299
? Deno.env.get('XDG_DATA_HOME')
300300
: path.join(os.homedir(), '.config')
301-
const vscodeDataDirs = path.join( // TODO
301+
const vscodeDataDir = path.join( // TODO
302302
os.homedir(),
303303
'.dotfiles/.data/vscode-datadirs',
304304
extensionNameShort,
305305
)
306-
const vscodeExtDirs = path.join(
306+
const vscodeExtDir = path.join(
307307
os.homedir(),
308308
'.dotfiles/.data/vscode-extensions',
309309
extensionNameShort,
@@ -322,9 +322,7 @@ async function createVSCodeLaunchers(positionals: string[]) {
322322
Name=VSCode: ${ecosystemNamePretty}
323323
Comment=Code Editing. Redefined.
324324
GenericName=Text Editor
325-
Exec=code --user-data-dir ${path.join(vscodeDataDirs, packageJson.name)} --extensions-dir ${
326-
path.join(vscodeExtDirs, packageJson.name)
327-
} %F
325+
Exec=code --user-data-dir ${vscodeDataDir} --extensions-dir ${vscodeExtDir} %F
328326
Icon=${iconFile}
329327
Type=Application
330328
StartupNotify=false
@@ -336,9 +334,7 @@ Keywords=vscode;
336334
337335
[Desktop Action new-empty-window]
338336
Name=New Empty Window: ${ecosystemNamePretty}
339-
Exec=code --user-data-dir ${path.join(vscodeDataDirs, packageJson.name)} --extensions-dir ${
340-
path.join(vscodeExtDirs, packageJson.name)
341-
} --new-window %F
337+
Exec=code --user-data-dir ${vscodeDataDir} --extensions-dir ${vscodeExtDir} --new-window %F
342338
Icon=${iconFile}`,
343339
)
344340
fs.copyFileSync(
@@ -354,7 +350,7 @@ Icon=${iconFile}`,
354350

355351
for (const filename of ['keybindings.json', 'settings.json', 'snippets']) {
356352
const source = path.join(configDir, 'Code/User', filename)
357-
const target = path.join(vscodeDataDirs, 'User', filename)
353+
const target = path.join(vscodeDataDir, 'User', filename)
358354
let targetStat = null
359355
try {
360356
targetStat = fs.lstatSync(target)
@@ -378,17 +374,17 @@ Icon=${iconFile}`,
378374
}
379375
}
380376

381-
if (!fs.existsSync(vscodeDataDirs) || !fs.existsSync(vscodeExtDirs)) {
377+
if (!fs.existsSync(vscodeDataDir) || !fs.existsSync(vscodeExtDir)) {
382378
console.info(
383379
`${styleText('blue', 'NOTE:')} Installing "${packageJson.name}" VSCode extension`,
384380
)
385381
spawnSync(
386382
'code',
387383
[
388384
'--user-data-dir',
389-
vscodeDataDirs,
385+
vscodeDataDir,
390386
'--extensions-dir',
391-
vscodeExtDirs,
387+
vscodeExtDir,
392388
'--install-extension',
393389
`EdwinKofler.${packageJson.name}`,
394390
'--install-extension',

config/lint-rules/400-ecosystem/c/clang-format.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import type { Issues } from '#types'
33
import dedent from 'dedent'
44

55
export const issues: Issues = async function* issues() {
6+
// TODO: AlignEscapedNewlines: LeftWithLastLine,
67
const content = dedent`
78
{
89
BasedOnStyle: LLVM,

deno.jsonc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
"test": "node ./test/test.ts",
66
"dev": "deno run --watch --allow-all ./bin/dev.ts"
77
},
8+
"nodeModulesDir": "auto",
9+
"workspace": ["./devutils"],
810
"exclude": [
911
"devserver/static",
1012
"config/templates",

deno.lock

Lines changed: 9 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

devutils/deno.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"tasks": {
3+
"dev": "deno run --watch main.ts"
4+
},
5+
"imports": {
6+
"globby": "npm:globby@^14.1.0",
7+
"type-fest": "npm:type-fest@^4.41.0"
8+
}
9+
}

devutils/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import type { PackageJson } from 'type-fest'
44

55
export async function getEcosystems(rootDir: string): Promise<string[]> {
66
using _ = ((origDir: string) => ({
7-
[Symbol.dispose]: () => Deno.chdir(origDir),
8-
}))(Deno.cwd())
9-
Deno.chdir(rootDir)
7+
[Symbol.dispose]: () => process.chdir(origDir),
8+
}))(process.cwd())
9+
process.chdir(rootDir)
1010

1111
const ecosystems: string[] = []
1212

@@ -21,7 +21,7 @@ export async function getEcosystems(rootDir: string): Promise<string[]> {
2121
}
2222
}
2323

24-
if ((await fileExists('deno.jsonc')) || (await fileExists('deno.json'))) {
24+
if ((await fileExists('process.jsonc')) || (await fileExists('process.json'))) {
2525
ecosystems.push('deno')
2626
}
2727

@@ -44,7 +44,7 @@ export async function getEcosystems(rootDir: string): Promise<string[]> {
4444
console.error(
4545
`CMAkeLists.txt should have language defined in project()`,
4646
)
47-
Deno.exit(1)
47+
process.exit(1)
4848
}
4949
}
5050

0 commit comments

Comments
 (0)