-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
6,545 additions
and
9,576 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
nodejs 18.19.0 | ||
nodejs 20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,35 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "pnpm test", | ||
"request": "launch", | ||
"runtimeArgs": ["test"], | ||
"runtimeExecutable": "pnpm", | ||
"skipFiles": ["<node_internals>/**"], | ||
"console": "integratedTerminal", | ||
"type": "node" | ||
}, | ||
{ | ||
"name": "Pinata upload", | ||
"program": "${workspaceFolder}/examples/upload-pinata.mjs", | ||
"request": "launch", | ||
"skipFiles": ["<node_internals>/**"], | ||
"type": "node" | ||
}, | ||
{ | ||
"name": "LocalNode upload", | ||
"program": "${workspaceFolder}/examples/upload-local-ipfs.mjs", | ||
"request": "launch", | ||
"skipFiles": ["<node_internals>/**"], | ||
"type": "node" | ||
}, | ||
{ | ||
"command": "./node_modules/.bin/astro dev --force", | ||
"name": "Astro example server", | ||
"cwd": "${workspaceFolder}/examples/astro-example", | ||
"request": "launch", | ||
"type": "node-terminal" | ||
} | ||
] | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "pnpm test", | ||
"request": "launch", | ||
"runtimeArgs": ["test"], | ||
"runtimeExecutable": "/opt/homebrew/bin/pnpm", | ||
"skipFiles": ["<node_internals>/**"], | ||
"console": "integratedTerminal", | ||
"type": "node" | ||
}, | ||
{ | ||
"name": "Pinata upload", | ||
"program": "${workspaceFolder}/examples/upload-pinata.mjs", | ||
"request": "launch", | ||
"skipFiles": ["<node_internals>/**"], | ||
"type": "node" | ||
}, | ||
{ | ||
"name": "LocalNode upload", | ||
"program": "${workspaceFolder}/examples/upload-local-ipfs.mjs", | ||
"request": "launch", | ||
"skipFiles": ["<node_internals>/**"], | ||
"type": "node" | ||
}, | ||
{ | ||
"command": "./node_modules/.bin/astro dev --force", | ||
"name": "Astro example server", | ||
"cwd": "${workspaceFolder}/examples/astro-example", | ||
"request": "launch", | ||
"type": "node-terminal" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,47 @@ | ||
const esModules = [ | ||
"is-ip", | ||
"jest-tests-browser", | ||
"@lukso/data-provider-base", | ||
"@lukso/data-provider-ipfs-http-client", | ||
"@lukso/data-provider-urlresolver", | ||
"data-provider-ipfs-http-client", | ||
"jest-tests-browser", | ||
"is-ip", | ||
"jest-tests-browser", | ||
"@lukso/data-provider-base", | ||
"@lukso/data-provider-ipfs-http-client", | ||
"@lukso/data-provider-urlresolver", | ||
"data-provider-ipfs-http-client", | ||
"jest-tests-browser", | ||
].join("|"); | ||
|
||
module.exports = { | ||
roots: ["<rootDir>"], | ||
testMatch: ["**/*.spec.mts", "**/*.spec.ts"], | ||
testEnvironment: "jsdom", // jest-presets/jest/browser/jest-environment-jsdom.ts", | ||
transform: { | ||
"^.+\\.(ts|tsx|js|mjs)?$": [ | ||
"ts-jest", | ||
{ | ||
useESM: true, | ||
}, | ||
], | ||
}, | ||
moduleFileExtensions: [ | ||
"ts", | ||
"tsx", | ||
"js", | ||
"jsx", | ||
"json", | ||
"node", | ||
"mjs", | ||
"cjs", | ||
], | ||
extensionsToTreatAsEsm: [".ts"], | ||
modulePathIgnorePatterns: [ | ||
"<rootDir>/test/__fixtures__", | ||
"<rootDir>/node_modules", | ||
"<rootDir>/dist", | ||
], | ||
setupFilesAfterEnv: ["jest-presets/jest/browser/jest-setup.js"], | ||
preset: "ts-jest", | ||
transformIgnorePatterns: [ | ||
`/node_modules/(?!${esModules})`, | ||
"lukso-data-providers", | ||
], | ||
silent: false, | ||
verbose: true, | ||
roots: ["<rootDir>"], | ||
testMatch: ["**/*.spec.mts", "**/*.spec.ts"], | ||
testEnvironment: "@happy-dom/jest-environment", // jest-presets/jest/browser/jest-environment-jsdom.ts", | ||
transform: { | ||
"^.+\\.(ts|tsx|js|mjs)?$": [ | ||
"ts-jest", | ||
{ | ||
useESM: true, | ||
}, | ||
], | ||
}, | ||
moduleFileExtensions: [ | ||
"ts", | ||
"tsx", | ||
"js", | ||
"jsx", | ||
"json", | ||
"node", | ||
"mjs", | ||
"cjs", | ||
], | ||
extensionsToTreatAsEsm: [".ts"], | ||
modulePathIgnorePatterns: [ | ||
"<rootDir>/test/__fixtures__", | ||
"<rootDir>/node_modules", | ||
"<rootDir>/dist", | ||
], | ||
setupFilesAfterEnv: ["jest-presets/jest/browser/jest-setup.js"], | ||
preset: "ts-jest", | ||
transformIgnorePatterns: [ | ||
`/node_modules/(?!${esModules})`, | ||
"lukso-data-providers", | ||
], | ||
silent: false, | ||
verbose: true, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,32 @@ | ||
const crypto = require("node:crypto"); | ||
const { TextEncoder, TextDecoder } = require("node:util"); | ||
const ResizeObserver = require("resize-observer-polyfill"); | ||
// const crypto = require("node:crypto"); | ||
// const { TextEncoder, TextDecoder } = require("node:util"); | ||
// const ResizeObserver = require("resize-observer-polyfill"); | ||
const { config } = require("dotenv"); | ||
|
||
config({ path: "../../.env.test" }); | ||
|
||
Object.defineProperty(globalThis, "crypto", { | ||
value: crypto, | ||
}); | ||
Object.defineProperty(globalThis, "Uint32Array", { | ||
value: Uint32Array, | ||
}); | ||
Object.defineProperty(globalThis, "Uint8Array", { | ||
value: Uint8Array, | ||
}); | ||
Object.defineProperty(globalThis, "ArrayBuffer", { | ||
value: ArrayBuffer, | ||
}); | ||
// Object.defineProperty(globalThis, "crypto", { | ||
// value: crypto, | ||
// }); | ||
// Object.defineProperty(globalThis, "Uint32Array", { | ||
// value: Uint32Array, | ||
// }); | ||
// Object.defineProperty(globalThis, "Uint8Array", { | ||
// value: Uint8Array, | ||
// }); | ||
// Object.defineProperty(globalThis, "ArrayBuffer", { | ||
// value: ArrayBuffer, | ||
// }); | ||
|
||
Object.defineProperty(globalThis, "ArrayBuffer", { | ||
value: ArrayBuffer, | ||
}); | ||
Object.defineProperty(globalThis, "TextDecoder", { | ||
value: TextDecoder, | ||
}); | ||
Object.defineProperty(globalThis, "TextEncoder", { | ||
value: TextEncoder, | ||
}); | ||
Object.defineProperty(globalThis, "ResizeObserver", { | ||
value: ResizeObserver, | ||
}); | ||
// Object.defineProperty(globalThis, "ArrayBuffer", { | ||
// value: ArrayBuffer, | ||
// }); | ||
// Object.defineProperty(globalThis, "TextDecoder", { | ||
// value: TextDecoder, | ||
// }); | ||
// Object.defineProperty(globalThis, "TextEncoder", { | ||
// value: TextEncoder, | ||
// }); | ||
// Object.defineProperty(globalThis, "ResizeObserver", { | ||
// value: ResizeObserver, | ||
// }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.