gst-common 1.0.1 → 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.d.cts CHANGED
@@ -1,13 +1,9 @@
1
- declare function sayHello({ firstName, lastName, age, }: {
2
- firstName: string;
3
- lastName: string;
4
- age?: number;
5
- }): string;
6
-
7
1
  type SayHelloProps = {
8
2
  firstName: string;
9
3
  lastName: string;
10
4
  age?: number;
11
5
  };
12
6
 
7
+ declare function sayHello({ firstName, lastName, age }: SayHelloProps): string;
8
+
13
9
  export { type SayHelloProps, sayHello };
package/dist/index.d.ts CHANGED
@@ -1,13 +1,9 @@
1
- declare function sayHello({ firstName, lastName, age, }: {
2
- firstName: string;
3
- lastName: string;
4
- age?: number;
5
- }): string;
6
-
7
1
  type SayHelloProps = {
8
2
  firstName: string;
9
3
  lastName: string;
10
4
  age?: number;
11
5
  };
12
6
 
7
+ declare function sayHello({ firstName, lastName, age }: SayHelloProps): string;
8
+
13
9
  export { type SayHelloProps, sayHello };
@@ -1,11 +1,17 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
1
+ // src/functions.ts
2
+ function sayHello({ firstName, lastName, age }) {
3
+ const name = `${firstName} ${lastName}`;
4
+ const greeting = `Hello, ${name}!`;
5
+ if (age) {
6
+ return `${greeting}, are ${age} years old.`;
7
+ } else {
8
+ return greeting;
9
+ }
10
+ }
11
+ export {
12
+ sayHello
13
+ };
14
+ __defProp(target, name, { get: all[name], enumerable: true });
9
15
  };
10
16
  var __copyProps = (to, from, except, desc) => {
11
17
  if (from && typeof from === "object" || typeof from === "function") {
@@ -25,15 +31,11 @@ __export(index_exports, {
25
31
  module.exports = __toCommonJS(index_exports);
26
32
 
27
33
  // src/functions.ts
28
- function sayHello({
29
- firstName,
30
- lastName,
31
- age
32
- }) {
34
+ function sayHello({ firstName, lastName, age }) {
33
35
  const name = `${firstName} ${lastName}`;
34
36
  const greeting = `Hello, ${name}!`;
35
37
  if (age) {
36
- return `${greeting}, you are ${age} years old.`;
38
+ return `${greeting}, are ${age} years old.`;
37
39
  } else {
38
40
  return greeting;
39
41
  }
package/package.json CHANGED
@@ -1,13 +1,19 @@
1
1
  {
2
2
  "name": "gst-common",
3
- "version": "1.0.1",
4
- "description": "store all common variables that we need",
5
- "main": "./dist/index.js",
3
+ "version": "1.0.2",
4
+ "description": "Store all common variables that we need",
5
+ "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
7
7
  "types": "./dist/index.d.ts",
8
8
  "type": "module",
9
+ "exports": {
10
+ "import": "./dist/index.mjs",
11
+ "require": "./dist/index.cjs"
12
+ },
9
13
  "scripts": {
10
- "build": "tsup"
14
+ "build": "tsup",
15
+ "publish:npm": "npm publish",
16
+ "release": "npm run build && npm run publish:npm"
11
17
  },
12
18
  "repository": {
13
19
  "type": "git",
package/dist/index.js DELETED
@@ -1,17 +0,0 @@
1
- // src/functions.ts
2
- function sayHello({
3
- firstName,
4
- lastName,
5
- age
6
- }) {
7
- const name = `${firstName} ${lastName}`;
8
- const greeting = `Hello, ${name}!`;
9
- if (age) {
10
- return `${greeting}, you are ${age} years old.`;
11
- } else {
12
- return greeting;
13
- }
14
- }
15
- export {
16
- sayHello
17
- };