Skip to content

Commit

Permalink
refactor(Pluto): remove all instances of PlutoSqlite (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
curtis-h authored Oct 30, 2023
1 parent 854379a commit bc9ab4e
Show file tree
Hide file tree
Showing 23 changed files with 164 additions and 3,343 deletions.
21 changes: 14 additions & 7 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,30 @@
"version": "0.2.0",
"configurations": [
{
"name": "NODE DEBUG",
"program": "${workspaceFolder}/.mock/dist/.mock/src/index.js",
"name": "NODE DEMO",
"type": "node",
"request": "launch",
"runtimeExecutable": "${workspaceRoot}/demos/node/node_modules/.bin/ts-node",
"runtimeArgs": ["--transpile-only"],
"program": "${workspaceRoot}/demos/node/src/index.ts",
"skipFiles": ["<node_internals>/**"],
"type": "node",
"cwd": "${workspaceFolder}/.mock"
"cwd": "${workspaceRoot}"
},
{
"name": "TESTS",
"type": "node",
"request": "launch",
"name": "TEST",
"program": "${workspaceRoot}/node_modules/jest/bin/jest.js",
"args": ["--colors", "--maxWorkers", "1"],
"args": [
"--colors",
"--workerThreads",
"--maxWorkers",
"1"
],
"skipFiles": [
"${workspaceRoot}/../../node_modules/**/*",
"<node_internals>/**/*"
]
}
]
}
}
12 changes: 11 additions & 1 deletion demos/browser/craco.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,17 @@ const path = require("path");
module.exports = {
webpack: {
configure: (webpackConfig) => {
webpackConfig.resolve.extensions.push(".wasm"); // To resolve .wasm extensions
// Pluto - include not src file
const moduleScopePlugin = webpackConfig.resolve.plugins.find(({ constructor }) => constructor?.name === "ModuleScopePlugin");
const demosPath = path.resolve(__dirname, "../");
moduleScopePlugin.appSrcs = [demosPath];
const oneOfRule = webpackConfig.module.rules.find(x => x.oneOf);
const tsxRule = oneOfRule.oneOf.find(x => x.test && x.test.toString().includes("tsx"));
const plutoPath = `${demosPath}/pluto/`;
tsxRule.include = [tsxRule.include, plutoPath];

// Wasms - copy to public
webpackConfig.resolve.extensions.push(".wasm");
webpackConfig.plugins = [
new CopyPlugin({
patterns: [
Expand All @@ -22,6 +31,7 @@ module.exports = {
}),
...(webpackConfig.plugins || []),
];

webpackConfig.resolve.fallback = {
fs: false,
crypto: false,
Expand Down
2 changes: 1 addition & 1 deletion demos/browser/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { mnemonicsAtom } from "./state";
import { trimString } from "./utils";
import Spacer from "./Spacer";
import { Box } from "./Box";
import { PlutoInMemory } from "./PlutoInMemory";
import { PlutoInMemory } from "../../pluto/PlutoInMemory";

const BasicMessage = SDK.BasicMessage;
const ListenerKey = SDK.ListenerKey;
Expand Down
Loading

0 comments on commit bc9ab4e

Please sign in to comment.