Skip to content

Commit

Permalink
chore: use cjs for extension and mjs for esbuild script
Browse files Browse the repository at this point in the history
package update as well.
  • Loading branch information
mbehr1 committed Jan 2, 2025
1 parent 30a4d26 commit e45ef1d
Show file tree
Hide file tree
Showing 5 changed files with 2,105 additions and 2,073 deletions.
5 changes: 3 additions & 2 deletions esbuild.js → esbuild.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const esbuild = require('esbuild')
import * as esbuild from 'esbuild'

const production = process.argv.includes('--production')
const watch = process.argv.includes('--watch')
Expand All @@ -12,7 +12,8 @@ async function main() {
sourcemap: !production,
sourcesContent: false,
platform: 'node',
outdir: 'out',
// outdir: 'out',
outfile: 'out/extension/extension.cjs',
external: ['vscode'],
logLevel: 'silent',
plugins: [
Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"supported": true
}
},
"main": "./out/extension/extension.js",
"main": "./out/extension/extension.cjs",
"contributes": {
"commands": [
{
Expand Down Expand Up @@ -102,13 +102,13 @@
},
"scripts": {
"prepare": "husky install",
"compile": "npm run check-types && node esbuild.js && npm run build:webview",
"compile": "npm run check-types && node esbuild.mjs && npm run build:webview",
"check-types": "tsc --noEmit",
"watch": "npm-run-all -p watch:*",
"watch:esbuild": "node esbuild.js --watch",
"watch:esbuild": "node esbuild.mjs --watch",
"watch:tsc": "tsc --noEmit --watch --project tsconfig.json",
"vscode:prepublish": "yarn run package",
"package": "npm run check-types && node esbuild.js --production && npm run build:webview",
"package": "npm run check-types && node esbuild.mjs --production && npm run build:webview",
"build:webview": "yarn --cwd ./src/webview build",
"lint": "eslint src --ext ts",
"watch:webview": "webpack --watch --mode development",
Expand All @@ -124,25 +124,25 @@
"@types/json5": "2.2.0",
"@types/jsonpath": "0.2.4",
"@types/mocha": "^9.1.1",
"@types/node": "^16.11.7",
"@types/node": "^20.17.11",
"@types/request": "^2.48.8",
"@types/vscode": "^1.80.0",
"@typescript-eslint/eslint-plugin": "^6.7.3",
"@typescript-eslint/parser": "^6.7.3",
"esbuild": "^0.24.0",
"eslint": "^8.50.0",
"glob": "^10.3.4",
"glob": "^11.0.0",
"husky": "^8.0.1",
"mocha": "^10.0.0",
"prettier": "^3.1.1",
"semantic-release": "^21.0.1",
"semantic-release-vsce": "^5.5.6",
"typescript": "^5.2.2",
"semantic-release": "^24.2.0",
"semantic-release-vsce": "^6.0.5",
"typescript": "~5.7.2",
"vsce": "^2.15.0",
"vscode-test": "^1.6.1"
},
"dependencies": {
"@vscode/extension-telemetry": "^0.8.4",
"@vscode/extension-telemetry": "^0.9.8",
"dlt-logs-utils": "0.10.0",
"jju": "github:mbehr1/jju#3aa4169df926e99083fdd511d7c20b5bd9ba789f",
"js-yaml": "^4.1.0",
Expand Down
2 changes: 1 addition & 1 deletion src/extension/fbaNBRQRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { assert as mdassert } from 'mdast-util-assert'
class FBANBRQCell extends vscode.NotebookCellData {
constructor(kind: vscode.NotebookCellKind, value: string, languageId: string, metadata?: object) {
super(kind, value, languageId)
super.metadata = {
this.metadata = {
fbaRdr: 'FBANBRestQueryRenderer',
...metadata,
}
Expand Down
51 changes: 26 additions & 25 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
{
"compilerOptions": {
"typeRoots": [
"./node_modules/@types",
"./types"
],
"module": "es2022",
"moduleResolution": "bundler",
"target": "es2021",
"outDir": "out",
"lib": [
"es2021"
],
"sourceMap": true,
"rootDir": "src",
"strict": true, /* enable all strict type-checking options */
/* Additional Checks */
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
// "noUnusedParameters": true, /* Report errors on unused parameters. */
},
"exclude": [
"node_modules",
".vscode-test",
"src/webview"
]
"compilerOptions": {
"typeRoots": [
"./node_modules/@types",
"./types"
],
"module": "es2022",
"moduleResolution": "bundler",
"target": "es2021",
"outDir": "out",
"lib": [
"es2021"
],
"sourceMap": true,
"rootDir": "src",
"strict": true,
"strictNullChecks": true
/* Additional Checks */
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
// "noUnusedParameters": true, /* Report errors on unused parameters. */
},
"exclude": [
"node_modules",
".vscode-test",
"src/webview"
]
}
Loading

0 comments on commit e45ef1d

Please sign in to comment.