Skip to content

Commit 4e177da

Browse files
committed
Revert "Add vanilla esm support and example. (#204)"
This reverts commit 5acadea.
1 parent 8ee0e4b commit 4e177da

File tree

28 files changed

+18
-391
lines changed

28 files changed

+18
-391
lines changed

.changeset/healthy-tigers-enjoy.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
node-version: ${{ matrix.node }}
2222
cache: 'pnpm'
2323
- run: pnpm install --frozen-lockfile
24-
- run: pnpm build:code
24+
- run: pnpm build
2525
- run: pnpm test:ci
2626
- uses: codecov/codecov-action@v4
2727

@@ -40,10 +40,5 @@ jobs:
4040
node-version: ${{ matrix.node }}
4141
cache: 'pnpm'
4242
- run: pnpm install --frozen-lockfile
43-
- run: pnpm build:code
44-
- run: |
45-
sudo chown root examples/basic-react/node_modules/electron/dist/chrome-sandbox \
46-
&& sudo chmod 4755 examples/basic-react/node_modules/electron/dist/chrome-sandbox \
47-
&& sudo chown root examples/basic-vanilla-esm/node_modules/electron/dist/chrome-sandbox \
48-
&& sudo chmod 4755 examples/basic-vanilla-esm/node_modules/electron/dist/chrome-sandbox
43+
- run: pnpm build
4944
- run: xvfb-run --auto-servernum -- pnpm test:e2e

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ npm install --save electron-trpc
5858
2. Expose the IPC to the render process from the [preload file](https://www.electronjs.org/docs/latest/tutorial/process-model#preload-scripts):
5959

6060
```ts
61-
import { exposeElectronTRPC } from 'electron-trpc/preload';
61+
import { exposeElectronTRPC } from 'electron-trpc/main';
6262

6363
process.once('loaded', async () => {
6464
exposeElectronTRPC();

examples/basic-react-superjson/preload/preload.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { exposeElectronTRPC } from 'electron-trpc/preload';
1+
import { exposeElectronTRPC } from 'electron-trpc/main';
22

33
process.once('loaded', async () => {
44
exposeElectronTRPC();

examples/basic-react-superjson/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"forceConsistentCasingInFileNames": true,
66
"jsx": "react",
77
"lib": ["dom", "esnext"],
8-
"module": "node16",
8+
"module": "esnext",
99
"moduleResolution": "node16",
1010
"noEmit": true,
1111
"noFallthroughCasesInSwitch": true,

examples/basic-react/index.e2e.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@ import { _electron as electron, test, expect } from '@playwright/test';
33
test('Hello Electron', async () => {
44
const electronApp = await electron.launch({
55
args: [`${__dirname}`],
6-
executablePath: process.env.PLAYWRIGHT_ELECTRON_PATH || undefined,
7-
env: {
8-
...process.env,
9-
NODE_ENV: 'development',
10-
},
6+
executablePath: process.env.PLAYWRIGHT_ELECTRON_PATH ?? undefined,
117
});
128

139
const window = await electronApp.firstWindow();

examples/basic-react/preload/preload.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { exposeElectronTRPC } from 'electron-trpc/preload';
1+
import { exposeElectronTRPC } from 'electron-trpc/main';
22

33
process.once('loaded', async () => {
44
exposeElectronTRPC();

examples/basic-react/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"forceConsistentCasingInFileNames": true,
66
"jsx": "react",
77
"lib": ["dom", "esnext"],
8-
"module": "node16",
8+
"module": "esnext",
99
"moduleResolution": "node16",
1010
"noEmit": true,
1111
"noFallthroughCasesInSwitch": true,

examples/basic-vanilla-esm/CHANGELOG.md

Lines changed: 0 additions & 134 deletions
This file was deleted.

examples/basic-vanilla-esm/electron/api.mjs

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)