Skip to content

Commit

Permalink
Fix :node prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
kaisalmen committed Oct 4, 2024
1 parent 2a07e2f commit 242d8e6
Show file tree
Hide file tree
Showing 14 changed files with 21 additions and 21 deletions.
6 changes: 3 additions & 3 deletions packages/examples/build/downloadResources.mts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
* Licensed under the MIT License. See LICENSE in the package root for license information.
* ------------------------------------------------------------------------------------------ */

import { existsSync, mkdirSync, writeFileSync } from 'fs';
import { dirname, resolve } from 'path';
import { fileURLToPath } from 'url';
import { existsSync, mkdirSync, writeFileSync } from 'node:fs';
import { dirname, resolve } from 'node:path';
import { fileURLToPath } from 'node:url';

export const getLocalDirectory = () => {
const __filename = fileURLToPath(import.meta.url);
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/src/common/node/server-commons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import { URL } from 'node:url';
import { Socket } from 'node:net';
import { dirname } from 'node:path';
import { fileURLToPath } from 'node:url';
import * as cp from 'node:child_process';
import { IWebSocket, WebSocketMessageReader, WebSocketMessageWriter } from 'vscode-ws-jsonrpc';
import { createConnection, createServerProcess, forward } from 'vscode-ws-jsonrpc/server';
import { Message, InitializeRequest, InitializeParams, RequestMessage, ResponseMessage } from 'vscode-languageserver-protocol';
import * as cp from 'child_process';

export enum LanguageName {
/** https://nodejs.org/api/cli.html */
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/src/json/server/json-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Copyright (c) 2024 TypeFox and others.
* Licensed under the MIT License. See LICENSE in the package root for license information.
* ------------------------------------------------------------------------------------------ */
import { readFile } from 'fs';
import { readFile } from 'node:fs';
import requestLight from 'request-light';
import * as URI from 'vscode-uri';
import 'vscode-ws-jsonrpc';
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/vite.bundle.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Licensed under the MIT License. See LICENSE in the package root for license information.
* ------------------------------------------------------------------------------------------ */

import path from 'node:path';
import { defineConfig } from 'vite';
import path from 'path';

export default defineConfig({
build: {
Expand Down
6 changes: 3 additions & 3 deletions packages/vscode-ws-jsonrpc/src/server/launch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
* Licensed under the MIT License. See LICENSE in the package root for license information.
* ------------------------------------------------------------------------------------------ */

import * as net from 'net';
import * as stream from 'stream';
import * as cp from 'child_process';
import * as net from 'node:net';
import * as stream from 'node:stream';
import * as cp from 'node:child_process';
import { StreamMessageReader, StreamMessageWriter, SocketMessageReader, SocketMessageWriter } from 'vscode-jsonrpc/node.js';
import { IConnection, createConnection } from './connection.js';
import { IWebSocket, IWebSocketConnection } from '../socket/socket.js';
Expand Down
4 changes: 2 additions & 2 deletions packages/wrapper/build/buildWorker.mts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Licensed under the MIT License. See LICENSE in the package root for license information.
* ------------------------------------------------------------------------------------------ */

import { dirname, resolve } from 'path';
import { fileURLToPath } from 'url';
import { dirname, resolve } from 'node:path';
import { fileURLToPath } from 'node:url';
import { build, Format } from 'esbuild';

export const getLocalDirectory = () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/wrapper/build/vite.cssWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See LICENSE in the package root for license information.
* ------------------------------------------------------------------------------------------ */

import path from 'path';
import path from 'node:path';
import { defineConfig } from 'vite';

const config = defineConfig({
Expand Down
2 changes: 1 addition & 1 deletion packages/wrapper/build/vite.editorWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See LICENSE in the package root for license information.
* ------------------------------------------------------------------------------------------ */

import path from 'path';
import path from 'node:path';
import { defineConfig } from 'vite';

const config = defineConfig({
Expand Down
2 changes: 1 addition & 1 deletion packages/wrapper/build/vite.htmlWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See LICENSE in the package root for license information.
* ------------------------------------------------------------------------------------------ */

import path from 'path';
import path from 'node:path';
import { defineConfig } from 'vite';

const config = defineConfig({
Expand Down
2 changes: 1 addition & 1 deletion packages/wrapper/build/vite.jsonWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See LICENSE in the package root for license information.
* ------------------------------------------------------------------------------------------ */

import path from 'path';
import path from 'node:path';
import { defineConfig } from 'vite';

const config = defineConfig({
Expand Down
2 changes: 1 addition & 1 deletion packages/wrapper/build/vite.tsWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See LICENSE in the package root for license information.
* ------------------------------------------------------------------------------------------ */

import path from 'path';
import path from 'node:path';
import { defineConfig } from 'vite';

const config = defineConfig({
Expand Down
4 changes: 2 additions & 2 deletions verify/angular/custom-webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* ------------------------------------------------------------------------------------------ */

// solve: __dirname is not defined in ES module scope
import { fileURLToPath } from 'url';
import { dirname, resolve } from 'path';
import { fileURLToPath } from 'node:url';
import { dirname, resolve } from 'node:path';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

Expand Down
4 changes: 2 additions & 2 deletions verify/webpack/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* ------------------------------------------------------------------------------------------ */

// solve: __dirname is not defined in ES module scope
import { fileURLToPath } from 'url';
import { dirname, resolve } from 'path';
import { fileURLToPath } from 'node:url';
import { dirname, resolve } from 'node:path';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

Expand Down
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* ------------------------------------------------------------------------------------------ */

import { defineConfig } from 'vite';
import * as path from 'path';
import * as path from 'node:path';
import importMetaUrlPlugin from '@codingame/esbuild-import-meta-url-plugin';
import vsixPlugin from '@codingame/monaco-vscode-rollup-vsix-plugin';
import react from '@vitejs/plugin-react';
Expand Down

0 comments on commit 242d8e6

Please sign in to comment.