Skip to content

Commit

Permalink
புதுச @constl/utils-test -இன் aegir அமைப்புகளைப் பயன்படுத்து
Browse files Browse the repository at this point in the history
  • Loading branch information
julienmalard committed Feb 22, 2024
1 parent 278e1b6 commit 0fa9f60
Show file tree
Hide file tree
Showing 3 changed files with 697 additions and 688 deletions.
68 changes: 2 additions & 66 deletions .aegir.js
Original file line number Diff line number Diff line change
@@ -1,67 +1,3 @@
import path, { dirname } from "path";
import { fileURLToPath } from "url";
import { createRequire } from "module";
import { config } from "@constl/utils-tests";

const require = createRequire(import.meta.url);

const __dirname = dirname(fileURLToPath(import.meta.url));

// https://github.com/node-webrtc/node-webrtc/issues/636#issuecomment-774171409
process.on("beforeExit", (code) => process.exit(code));

// https://github.com/ipfs/aegir/blob/master/md/migration-to-v31.md
const esbuild = {
// this will inject all the named exports from 'node-globals.js' as globals
inject: [path.join(__dirname, "./scripts/node-globals.js")],
external: [
"fs",
"path",
"os",
"chokidar",
"url",
"zlib",
"rimraf",
"electron",
"env-paths",
"@libp2p/tcp",
"@libp2p/mdns",
],
plugins: [
{
name: "node built ins", // this will make the bundler resolve node builtins to the respective browser polyfill
setup(build) {
build.onResolve({ filter: /^stream$/ }, () => {
return { path: require.resolve("stream-browserify") };
});
build.onResolve({ filter: /^os$/ }, () => {
return { path: require.resolve("os-browserify") };
});
build.onResolve({ filter: /^node\:process$/ }, () => {
return { path: require.resolve("process/browser") };
});
build.onResolve({ filter: /^crypto$/ }, () => {
return { path: require.resolve("crypto-browserify") };
});
build.onResolve({ filter: /^fs/ }, () => {
return { path: require.resolve("browserify-fs") };
});
},
},
],
};

/** @type {import('aegir').PartialOptions} */
const options = {
test: {
browser: {
config: {
buildConfig: esbuild,
},
},
},
build: {
config: esbuild,
},
};

export default options;
export default config.générerConfigÆgir();
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@
"devDependencies": {
"@constl/ipa": "1.0.0",
"@constl/orbit-db-types": "^2.0.0",
"@constl/utils-tests": "1.1.2",
"@constl/utils-tests": "1.2.2",
"@types/mocha": "^10.0.6",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^7.0.0",
"aegir": "^42.2.3",
"@typescript-eslint/eslint-plugin": "^7.0.2",
"@typescript-eslint/parser": "^7.0.2",
"aegir": "^42.2.4",
"browserify-fs": "^1.0.0",
"buffer": "^6.0.3",
"crypto-browserify": "^3.12.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"genversion": "^3.2.0",
"mocha": "^10.2.0",
"mocha": "^10.3.0",
"os-browserify": "^0.3.0",
"prettier": "^3.2.5",
"process": "^0.11.10",
Expand All @@ -50,15 +50,15 @@
"ts-node": "^10.9.2",
"ts-patch": "^3.1.2",
"typescript": "^5.3.3",
"typescript-transform-paths": "^3.4.6",
"typescript-transform-paths": "^3.4.7",
"wherearewe": "^2.0.1"
},
"peerDependencies": {
"@constl/ipa": "1.0.0"
},
"dependencies": {
"@constl/utils-ipa": "^1.0.0",
"@orbitdb/core": "^2.0.1",
"@orbitdb/core": "^2.1.0",
"deepcopy": "^2.1.0"
}
}
Loading

0 comments on commit 0fa9f60

Please sign in to comment.