@gjsify/node-globals 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # @gjsify/node-globals
2
+
3
+ Node.js globals module for Gjs
@@ -0,0 +1,17 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+ var errors_exports = {};
15
+ module.exports = __toCommonJS(errors_exports);
16
+ var import_utils = require("@gjsify/utils");
17
+ (0, import_utils.initErrorV8Methods)(Error);
@@ -0,0 +1,3 @@
1
+ var import_errors = require("./errors.js");
2
+ var import_require = require("@gjsify/require");
3
+ var import_global = require("@gjsify/deno_std/node/global");
@@ -0,0 +1,2 @@
1
+ import { initErrorV8Methods } from "@gjsify/utils";
2
+ initErrorV8Methods(Error);
@@ -0,0 +1,3 @@
1
+ import "./errors.js";
2
+ import "@gjsify/require";
3
+ import "@gjsify/deno_std/node/global";
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "@gjsify/node-globals",
3
+ "version": "0.0.2",
4
+ "description": "Node.js globals module for Gjs",
5
+ "keywords": [
6
+ "gjs",
7
+ "node",
8
+ "globals"
9
+ ],
10
+ "author": "Pascal Garber",
11
+ "main": "lib/cjs/index.js",
12
+ "module": "lib/esm/index.js",
13
+ "type": "module",
14
+ "exports": {
15
+ ".": {
16
+ "import": {
17
+ "types": "./lib/types/index.d.ts",
18
+ "default": "./lib/esm/index.js"
19
+ },
20
+ "require": {
21
+ "types": "./lib/types/index.d.ts",
22
+ "default": "./lib/cjs/index.js"
23
+ }
24
+ }
25
+ },
26
+ "scripts": {
27
+ "clear": "rm -rf lib tsconfig.tsbuildinfo test.node.mjs test.gjs.mjs",
28
+ "print:name": "echo '@gjsify/node-globals'",
29
+ "build": "yarn print:name && yarn build:gjsify",
30
+ "build:gjsify": "gjsify build --library 'src/**/*.{ts,js}' --exclude 'src/**/*.spec.{mts,ts}' 'src/test.{mts,ts}'",
31
+ "build:types": "tsc --project tsconfig.types.json || exit 0",
32
+ "build:test": "yarn build:test:gjs && yarn build:test:node",
33
+ "build:test:gjs": "gjsify build src/test.mts --app gjs --outfile test.gjs.mjs",
34
+ "build:test:node": "gjsify build src/test.mts --app node --outfile test.node.mjs",
35
+ "test": "yarn print:name && yarn build:gjsify && yarn build:test && yarn test:node && yarn test:gjs",
36
+ "test:gjs": "gjs -m test.gjs.mjs",
37
+ "test:node": "node test.node.mjs"
38
+ },
39
+ "dependencies": {
40
+ "@gjsify/deno_std": "^0.0.2",
41
+ "@gjsify/process": "^0.0.2",
42
+ "@gjsify/utils": "^0.0.2"
43
+ },
44
+ "devDependencies": {
45
+ "@gjsify/cli": "^0.0.2",
46
+ "@gjsify/unit": "^0.0.2"
47
+ }
48
+ }
package/src/errors.ts ADDED
@@ -0,0 +1,3 @@
1
+ import { initErrorV8Methods } from "@gjsify/utils";
2
+ initErrorV8Methods(Error);
3
+ export {}
@@ -0,0 +1,9 @@
1
+ import { describe, it, expect } from '@gjsify/unit';
2
+
3
+ export default async () => {
4
+ await describe('true', async () => {
5
+ await it('should be true', async () => {
6
+ expect(true).toBeTruthy();
7
+ });
8
+ });
9
+ }
package/src/index.ts ADDED
@@ -0,0 +1,3 @@
1
+ import "./errors.js";
2
+ import "@gjsify/require";
3
+ import "@gjsify/deno_std/node/global";
package/src/test.mts ADDED
@@ -0,0 +1,4 @@
1
+
2
+ import { run } from '@gjsify/unit';
3
+ import testSuite from './index.spec.js';
4
+ run({testSuite});