Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
title: ""
labels: ""
assignees: midouest

---

**Describe the bug**
A clear and concise description of what the bug is. If there is an error message, please include the exact error message and any relevant log messages.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -24,10 +24,11 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Platform (please complete the following information):**
- Operating system and version: [e.g. macOS Tahoe 26.0.1]
- Playdate SDK version: [e.g. 3.0.1]
- Visual Studio Code distribution and version: [e.g. VSCodium 1.105.1]
- Playdate Debug extension version: [e.g. 1.18.0]

- Operating system and version: [e.g. macOS Tahoe 26.0.1]
- Playdate SDK version: [e.g. 3.0.1]
- Visual Studio Code distribution and version: [e.g. VSCodium 1.105.1]
- Playdate Debug extension version: [e.g. 1.18.0]

**Additional context**
Please include either a link to the project or the contents all relevant files (e.g., `.vscode/settings.json`, `.vscode/tasks.json`, `.vscode/launch.json`, `source/main.lua`, `source/pdxinfo`, etc.).
Expand Down
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
title: ""
labels: ""
assignees: midouest

---

**Is your feature request related to a problem? Please describe.**
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 20.x
node-version: 24.x
cache: yarn
- name: Install dependencies
run: yarn install --frozen-lockfile
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 20.x
node-version: 24.x
cache: yarn
- name: Install dependencies
run: yarn install --frozen-lockfile
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 20.x
node-version: 24.x
cache: yarn
- name: Install dependencies
run: yarn install --frozen-lockfile
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20.19.5
v24.11.0
4 changes: 2 additions & 2 deletions .vscode-test.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineConfig } from '@vscode/test-cli';
import { defineConfig } from "@vscode/test-cli";

export default defineConfig({
files: 'out/test/**/*.test.js',
files: "out/test/**/*.test.js",
});
84 changes: 42 additions & 42 deletions esbuild.js
Original file line number Diff line number Diff line change
@@ -1,56 +1,56 @@
const esbuild = require("esbuild");

const production = process.argv.includes('--production');
const watch = process.argv.includes('--watch');
const production = process.argv.includes("--production");
const watch = process.argv.includes("--watch");

/**
* @type {import('esbuild').Plugin}
*/
const esbuildProblemMatcherPlugin = {
name: 'esbuild-problem-matcher',
name: "esbuild-problem-matcher",

setup(build) {
build.onStart(() => {
console.log('[watch] build started');
});
build.onEnd((result) => {
result.errors.forEach(({ text, location }) => {
console.error(`✘ [ERROR] ${text}`);
console.error(` ${location.file}:${location.line}:${location.column}:`);
});
console.log('[watch] build finished');
});
},
setup(build) {
build.onStart(() => {
console.log("[watch] build started");
});
build.onEnd((result) => {
result.errors.forEach(({ text, location }) => {
console.error(`✘ [ERROR] ${text}`);
console.error(
` ${location.file}:${location.line}:${location.column}:`,
);
});
console.log("[watch] build finished");
});
},
};

async function main() {
const ctx = await esbuild.context({
entryPoints: [
'src/extension.ts'
],
bundle: true,
format: 'cjs',
minify: production,
sourcemap: !production,
sourcesContent: false,
platform: 'node',
outfile: 'dist/extension.js',
external: ['vscode'],
logLevel: 'silent',
plugins: [
/* add to the end of plugins array */
esbuildProblemMatcherPlugin,
],
});
if (watch) {
await ctx.watch();
} else {
await ctx.rebuild();
await ctx.dispose();
}
const ctx = await esbuild.context({
entryPoints: ["src/extension.ts"],
bundle: true,
format: "cjs",
minify: production,
sourcemap: !production,
sourcesContent: false,
platform: "node",
outfile: "dist/extension.js",
external: ["vscode"],
logLevel: "silent",
plugins: [
/* add to the end of plugins array */
esbuildProblemMatcherPlugin,
],
});
if (watch) {
await ctx.watch();
} else {
await ctx.rebuild();
await ctx.dispose();
}
}

main().catch(e => {
console.error(e);
process.exit(1);
main().catch((e) => {
console.error(e);
process.exit(1);
});
14 changes: 7 additions & 7 deletions fixtures/workspace/fixtures.code-workspace
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"folders": [
{
"path": "basic-configuration"
"path": "basic-configuration",
},
{
"path": "override-configuration"
"path": "override-configuration",
},
{
"path": "pdc-configuration"
"path": "pdc-configuration",
},
{
"path": "playdate-simulator-configuration"
"path": "playdate-simulator-configuration",
},
{
"path": "debugger-configuration"
}
]
"path": "debugger-configuration",
},
],
}
19 changes: 9 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,28 +42,27 @@
"prepare": "husky"
},
"dependencies": {
"@vscode/vsce": "^2.15.0",
"inversify": "^6.2.1",
"inversify": "^7.10.4",
"reflect-metadata": "^0.2.2"
},
"devDependencies": {
"@types/glob": "^7.1.1",
"@types/mocha": "^10.0.10",
"@types/node": "20.x",
"@types/node": "24.x",
"@types/vscode": "^1.96.0",
"@typescript-eslint/eslint-plugin": "^8.17.0",
"@typescript-eslint/parser": "^8.17.0",
"@vscode/test-cli": "^0.0.10",
"@vscode/test-cli": "^0.0.12",
"@vscode/test-electron": "^2.4.1",
"@vscode/vsce": "^3.7.0",
"c8": "^10.1.3",
"esbuild": "^0.24.0",
"esbuild": "^0.27.0",
"eslint": "^9.16.0",
"eslint-import-resolver-typescript": "^3.7.0",
"eslint-import-resolver-typescript": "^4.4.4",
"eslint-plugin-import": "^2.31.0",
"glob": "^7.1.4",
"glob": "^11.0.3",
"husky": "^9.1.7",
"lint-staged": "^15.3.0",
"mocha": "^10.2.0",
"lint-staged": "^16.2.6",
"mocha": "^11.7.5",
"npm-run-all": "^4.1.5",
"ovsx": "^0.10.6",
"prettier": "^3.4.2",
Expand Down
2 changes: 1 addition & 1 deletion src/ExtensionModule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export abstract class ExtensionModule {
*/
static activate(
context: vscode.ExtensionContext,
classes: ExtensionModuleType[]
classes: ExtensionModuleType[],
): Container | null {
const loaded = ExtensionModule.load(...classes);
if (!loaded) {
Expand Down
4 changes: 2 additions & 2 deletions src/core/CoreModule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { isFolderless } from "./getWorkspaceRoot";

export class CoreModule extends ExtensionModule {
protected get containerModule(): ContainerModule {
return new ContainerModule((bind) => {
bind(ConfigurationResolver).toSelf();
return new ContainerModule((options) => {
options.bind(ConfigurationResolver).toSelf();
});
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/TaskExecutionFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ export type TaskExecution =
export interface TaskExecutionFactory {
createExecution(
definition: vscode.TaskDefinition,
scope: vscode.WorkspaceFolder | vscode.TaskScope
scope: vscode.WorkspaceFolder | vscode.TaskScope,
): Promise<TaskExecution | undefined>;
}
14 changes: 7 additions & 7 deletions src/core/TaskProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export interface TaskProviderOptions {
export class TaskProvider implements vscode.TaskProvider {
constructor(
@unmanaged() private factory: TaskExecutionFactory,
@unmanaged() private options: TaskProviderOptions
@unmanaged() private options: TaskProviderOptions,
) {}

async provideTasks(): Promise<vscode.Task[]> {
Expand All @@ -38,7 +38,7 @@ export class TaskProvider implements vscode.TaskProvider {

async resolveTask(
task: vscode.Task,
_token: vscode.CancellationToken
_token: vscode.CancellationToken,
): Promise<vscode.Task> {
const { definition, scope } = task;
try {
Expand All @@ -50,7 +50,7 @@ export class TaskProvider implements vscode.TaskProvider {

async createTask(
maybeDefinition?: vscode.Task["definition"],
maybeScope?: vscode.Task["scope"]
maybeScope?: vscode.Task["scope"],
): Promise<vscode.Task> {
const { type, problemMatchers, name, source } = this.options;
const definition = maybeDefinition ?? { type };
Expand All @@ -63,20 +63,20 @@ export class TaskProvider implements vscode.TaskProvider {
name,
source,
execution,
problemMatchers
problemMatchers,
);
}

protected createErrorTask(
error: unknown,
maybeDefinition?: vscode.Task["definition"],
maybeScope?: vscode.Task["scope"]
maybeScope?: vscode.Task["scope"],
): vscode.Task {
const { type, problemMatchers, name, source } = this.options;
const definition = maybeDefinition ?? { type };
const scope = maybeScope ?? vscode.TaskScope.Workspace;
const execution = new vscode.CustomExecution(() =>
Promise.resolve(new TaskProviderErrorTerminal(error))
Promise.resolve(new TaskProviderErrorTerminal(error)),
);

return new vscode.Task(
Expand All @@ -85,7 +85,7 @@ export class TaskProvider implements vscode.TaskProvider {
name,
source,
execution,
problemMatchers
problemMatchers,
);
}
}
2 changes: 1 addition & 1 deletion src/core/getGamePathFromSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as path from "path";

export function getGamePathFromSource(
sourcePath: string,
outputPath: string
outputPath: string,
): string {
const inputName = path.basename(sourcePath, ".lua");
return path.resolve(outputPath, inputName + ".pdx");
Expand Down
2 changes: 1 addition & 1 deletion src/core/getWorkspaceRoot.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as vscode from "vscode";

export function getWorkspaceRoot(
scope?: vscode.Uri | vscode.WorkspaceFolder | vscode.TaskScope
scope?: vscode.Uri | vscode.WorkspaceFolder | vscode.TaskScope,
): vscode.WorkspaceFolder | undefined {
if (scope instanceof vscode.Uri) {
return vscode.workspace.getWorkspaceFolder(scope);
Expand Down
2 changes: 1 addition & 1 deletion src/core/readSDKPath.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export async function readSDKPath(): Promise<string> {
if (!sdkPath) {
throw new Error(
"Could not find the Playdate SDK. " +
"Please ensure that the PlaydateSDK is installed and the PLAYDATE_SDK_PATH environment variable is set"
"Please ensure that the PlaydateSDK is installed and the PLAYDATE_SDK_PATH environment variable is set",
);
}

Expand Down
4 changes: 2 additions & 2 deletions src/core/writePDXInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ const knownKeyOrder: PDXInfoKey[] = [

export async function writePDXInfo(
pdxInfo: PDXInfo,
sourcePath: string
sourcePath: string,
): Promise<void> {
const knownKeys: string[] = knownKeyOrder;
const unknownKeys = Object.keys(pdxInfo).filter(
(key) => !knownKeys.includes(key)
(key) => !knownKeys.includes(key),
);
const unknownKeyOrder = sort(unknownKeys, compareAlphabetic);
const keyOrder = knownKeys.concat(unknownKeyOrder);
Expand Down
Loading