@michaelroling/ts-library 1.0.0 → 1.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/dist/index.js CHANGED
@@ -1,6 +1,2 @@
1
1
  import "./prototype/array";
2
- export function helloWorld() {
3
- return "Hello, World!";
4
- }
5
- const array = [1, 2, 3, 4, 5];
6
- array.mrLast();
2
+ export { helloWorld } from "./lib/test";
@@ -0,0 +1,3 @@
1
+ export function helloWorld() {
2
+ return "Hello, World!";
3
+ }
@@ -0,0 +1,8 @@
1
+ interface Array<T> {
2
+ /** Gets the first element of the array. */
3
+ mrFirst(): T | undefined;
4
+ /** Gets the last element of the array. */
5
+ mrLast(): T | undefined;
6
+ /** Gets the nth element of the array. */
7
+ mrNth(n: number): T | undefined;
8
+ }
@@ -0,0 +1,2 @@
1
+ import "./array";
2
+ export declare function helloWorld(): string;
package/package.json CHANGED
@@ -1,73 +1,51 @@
1
- {
2
- "name": "@michaelroling/ts-library",
3
- "version": "1.0.0",
4
- "description": "",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "module": "dist/index.js",
8
- "publishConfig": {
9
- "access": "public"
10
- },
11
- "dependencies": {
12
- "assertion-error": "^2.0.1",
13
- "chai": "^6.2.2",
14
- "es-module-lexer": "^1.7.0",
15
- "esbuild": "^0.27.2",
16
- "estree-walker": "^3.0.3",
17
- "expect-type": "^1.3.0",
18
- "fdir": "^6.5.0",
19
- "magic-string": "^0.30.21",
20
- "nanoid": "^3.3.11",
21
- "obug": "^2.1.1",
22
- "pathe": "^2.0.3",
23
- "picocolors": "^1.1.1",
24
- "picomatch": "^4.0.3",
25
- "postcss": "^8.5.6",
26
- "prettier": "3.8.0",
27
- "rollup": "^4.55.1",
28
- "siginfo": "^2.0.0",
29
- "source-map-js": "^1.2.1",
30
- "stackback": "^0.0.2",
31
- "std-env": "^3.10.0",
32
- "tinybench": "^2.9.0",
33
- "tinyexec": "^1.0.2",
34
- "tinyglobby": "^0.2.15",
35
- "tinyrainbow": "^3.0.3",
36
- "typescript": "^5.9.3",
37
- "undici-types": "^7.16.0",
38
- "vite": "^7.3.1",
39
- "vitest": "^4.0.17",
40
- "why-is-node-running": "^2.3.0"
41
- },
42
- "devDependencies": {
43
- "@eslint/js": "^9.39.2",
44
- "@vitest/coverage-v8": "4.0.17",
45
- "eslint": "^9.39.2",
46
- "globals": "^17.0.0",
47
- "jiti": "^2.6.1",
48
- "jsdom": "^27.4.0",
49
- "typescript-eslint": "^8.53.0"
50
- },
51
- "scripts": {
52
- "test": "vitest",
53
- "coverage": "vitest run --coverage",
54
- "lint": "eslint --ext .ts src --fix",
55
- "build": "tsc --build",
56
- "prepublishOnly": "yarn build"
57
- },
58
- "files": [
59
- "dist",
60
- "README.md",
61
- "LICENSE"
62
- ],
63
- "repository": {
64
- "type": "git",
65
- "url": "git+https://github.com/MiRo1310/ts-library.git"
66
- },
67
- "author": "Michael Roling",
68
- "license": "MIT",
69
- "bugs": {
70
- "url": "https://github.com/MiRo1310/ts-library/issues"
71
- },
72
- "homepage": "https://github.com/MiRo1310/ts-library#readme"
73
- }
1
+ {
2
+ "name": "@michaelroling/ts-library",
3
+ "version": "1.0.2",
4
+ "description": "",
5
+ "main": "dist/index.js",
6
+ "types": "dist/types/index.d.ts",
7
+ "module": "dist/index.js",
8
+ "publishConfig": {
9
+ "access": "public"
10
+ },
11
+ "dependencies": {
12
+ "chai": "^6.2.2",
13
+ "esbuild": "^0.27.2",
14
+ "prettier": "3.8.0",
15
+ "rollup": "^4.55.1",
16
+ "typescript": "^5.9.3",
17
+ "vitest": "^4.0.17"
18
+ },
19
+ "devDependencies": {
20
+ "@eslint/js": "^9.39.2",
21
+ "@vitest/coverage-v8": "4.0.17",
22
+ "cpx2": "^8.0.0",
23
+ "eslint": "^9.39.2",
24
+ "globals": "^17.0.0",
25
+ "jiti": "^2.6.1",
26
+ "jsdom": "^27.4.0",
27
+ "typescript-eslint": "^8.53.0"
28
+ },
29
+ "scripts": {
30
+ "test": "vitest",
31
+ "coverage": "vitest run --coverage",
32
+ "lint": "eslint --ext .ts src --fix",
33
+ "build": "tsc -p tsconfig.json && npx cpx2 \"src/types/**/*.d.ts\" dist/types",
34
+ "prepublishOnly": "yarn build"
35
+ },
36
+ "files": [
37
+ "dist",
38
+ "README.md",
39
+ "LICENSE"
40
+ ],
41
+ "repository": {
42
+ "type": "git",
43
+ "url": "git+https://github.com/MiRo1310/ts-library.git"
44
+ },
45
+ "author": "Michael Roling",
46
+ "license": "MIT",
47
+ "bugs": {
48
+ "url": "https://github.com/MiRo1310/ts-library/issues"
49
+ },
50
+ "homepage": "https://github.com/MiRo1310/ts-library#readme"
51
+ }
@@ -1,31 +0,0 @@
1
- import "../../prototype/array";
2
- import { it, expect, describe } from "vitest";
3
- describe("Array", () => {
4
- it("should get first element", () => {
5
- const array = [1, 2, 3, 4, 5];
6
- const firstElement = array.mrFirst();
7
- expect(firstElement).toBe(1);
8
- });
9
- it("should get undefined, no element in array", () => {
10
- const firstElement = [].mrFirst();
11
- expect(firstElement).toBe(undefined);
12
- });
13
- it("should get last element", () => {
14
- const array = [1, 2, 3, 4, 5, 6];
15
- const lastElement = array.mrLast();
16
- expect(lastElement).toBe(6);
17
- });
18
- it("should get undefined, no element in array", () => {
19
- const lastElement = [].mrLast();
20
- expect(lastElement).toBe(undefined);
21
- });
22
- it("should get nth element", () => {
23
- const array = [1, 2, 3, 4, 5, 6];
24
- const nthElement = array.mrNth(3);
25
- expect(nthElement).toBe(4);
26
- });
27
- it("should get undefined, no element in array", () => {
28
- const nthElement = [].mrNth(3);
29
- expect(nthElement).toBe(undefined);
30
- });
31
- });