@gjsify/querystring 0.4.0 → 0.4.4

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/package.json CHANGED
@@ -1,38 +1,41 @@
1
1
  {
2
- "name": "@gjsify/querystring",
3
- "version": "0.4.0",
4
- "description": "Node.js querystring module for Gjs",
5
- "type": "module",
6
- "module": "lib/esm/index.js",
7
- "types": "lib/types/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "types": "./lib/types/index.d.ts",
11
- "default": "./lib/esm/index.js"
2
+ "name": "@gjsify/querystring",
3
+ "version": "0.4.4",
4
+ "description": "Node.js querystring module for Gjs",
5
+ "type": "module",
6
+ "module": "lib/esm/index.js",
7
+ "types": "lib/types/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./lib/types/index.d.ts",
11
+ "default": "./lib/esm/index.js"
12
+ }
13
+ },
14
+ "files": [
15
+ "lib"
16
+ ],
17
+ "scripts": {
18
+ "clear": "rm -rf lib tsconfig.tsbuildinfo tsconfig.types.tsbuildinfo test.gjs.mjs test.node.mjs || exit 0",
19
+ "check": "tsc --noEmit",
20
+ "build": "gjsify run build:gjsify && gjsify run build:types",
21
+ "build:gjsify": "gjsify build --library 'src/**/*.{ts,js}' --exclude 'src/**/*.spec.{mts,ts}' 'src/test.{mts,ts}'",
22
+ "build:types": "tsc",
23
+ "build:test": "gjsify run build:test:gjs && gjsify run build:test:node",
24
+ "build:test:gjs": "gjsify build src/test.mts --app gjs --outfile test.gjs.mjs",
25
+ "build:test:node": "gjsify build src/test.mts --app node --outfile test.node.mjs",
26
+ "test": "gjsify run build:gjsify && gjsify run build:test && gjsify run test:node && gjsify run test:gjs",
27
+ "test:gjs": "gjsify run test.gjs.mjs",
28
+ "test:node": "node test.node.mjs"
29
+ },
30
+ "keywords": [
31
+ "gjs",
32
+ "node",
33
+ "fs"
34
+ ],
35
+ "devDependencies": {
36
+ "@gjsify/cli": "^0.4.4",
37
+ "@gjsify/unit": "^0.4.4",
38
+ "@types/node": "^25.6.2",
39
+ "typescript": "^6.0.3"
12
40
  }
13
- },
14
- "scripts": {
15
- "clear": "rm -rf lib tsconfig.tsbuildinfo tsconfig.types.tsbuildinfo test.gjs.mjs test.node.mjs || exit 0",
16
- "check": "tsc --noEmit",
17
- "build": "yarn build:gjsify && yarn build:types",
18
- "build:gjsify": "gjsify build --library 'src/**/*.{ts,js}' --exclude 'src/**/*.spec.{mts,ts}' 'src/test.{mts,ts}'",
19
- "build:types": "tsc",
20
- "build:test": "yarn build:test:gjs && yarn build:test:node",
21
- "build:test:gjs": "gjsify build src/test.mts --app gjs --outfile test.gjs.mjs",
22
- "build:test:node": "gjsify build src/test.mts --app node --outfile test.node.mjs",
23
- "test": "yarn build:gjsify && yarn build:test && yarn test:node && yarn test:gjs",
24
- "test:gjs": "gjsify run test.gjs.mjs",
25
- "test:node": "node test.node.mjs"
26
- },
27
- "keywords": [
28
- "gjs",
29
- "node",
30
- "fs"
31
- ],
32
- "devDependencies": {
33
- "@gjsify/cli": "^0.4.0",
34
- "@gjsify/unit": "^0.4.0",
35
- "@types/node": "^25.6.2",
36
- "typescript": "^6.0.3"
37
- }
38
- }
41
+ }
package/src/error.ts DELETED
@@ -1,34 +0,0 @@
1
- // Reference: Node.js lib/internal/errors.js — Node.js error base class
2
- // Reimplemented for GJS
3
- // TODO create module for node errors?
4
-
5
- /**
6
- * All error instances in Node have additional methods and properties
7
- * This export class is meant to be extended by these instances abstracting native JS error instances
8
- */
9
- export class NodeErrorAbstraction extends Error {
10
- code: string;
11
-
12
- constructor(name: string, code: string, message: string) {
13
- super(message);
14
- this.code = code;
15
- this.name = name;
16
- //This number changes depending on the name of this class
17
- //20 characters as of now
18
- this.stack = this.stack && `${name} [${this.code}]${this.stack.slice(20)}`;
19
- }
20
-
21
- override toString() {
22
- return `${this.name} [${this.code}]: ${this.message}`;
23
- }
24
- }
25
-
26
- export class NodeURIError extends NodeErrorAbstraction implements URIError {
27
- constructor(code: string, message: string) {
28
- super(URIError.prototype.name, code, message);
29
- Object.setPrototypeOf(this, URIError.prototype);
30
- this.toString = function () {
31
- return `${this.name} [${this.code}]: ${this.message}`;
32
- };
33
- }
34
- }