@heiwa4126/hello5 0.0.1-rc.0
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/LICENSE +21 -0
- package/README.md +93 -0
- package/dist/hello.cjs +31 -0
- package/dist/hello.d.ts +3 -0
- package/dist/hello.js +7 -0
- package/dist/main.cjs +5 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +4 -0
- package/package.json +53 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 heiwa4126
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# heiwa4126-hello5 (@heiwa4126/hello5)
|
|
2
|
+
|
|
3
|
+
NOTE: [heiwa4126/heiwa4126-hello4](https://github.com/heiwa4126/heiwa4126-hello4)
|
|
4
|
+
を
|
|
5
|
+
[egoist/tsup](https://github.com/egoist/tsup)
|
|
6
|
+
で書き換えたやつ。作業中
|
|
7
|
+
|
|
8
|
+
[](https://www.npmjs.com/package/@heiwa4126/hello5)
|
|
9
|
+
[](https://opensource.org/licenses/MIT)
|
|
10
|
+
[](https://www.typescriptlang.org/)
|
|
11
|
+
[](https://nodejs.org/)
|
|
12
|
+
|
|
13
|
+
TypeScript hello world library with dual ES modules/CommonJS support. Features GitHub Actions trusted publishing to npmjs with Sigstore attestation.
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @heiwa4126/hello5
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
### As a library
|
|
24
|
+
|
|
25
|
+
#### ES Modules (MJS)
|
|
26
|
+
|
|
27
|
+
```typescript
|
|
28
|
+
import { hello } from "@heiwa4126/hello5";
|
|
29
|
+
|
|
30
|
+
console.log(hello()); // "Hello!"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
#### CommonJS (CJS)
|
|
34
|
+
|
|
35
|
+
```javascript
|
|
36
|
+
const { hello } = require("@heiwa4126/hello5");
|
|
37
|
+
|
|
38
|
+
console.log(hello()); // "Hello!"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
#### TypeScript
|
|
42
|
+
|
|
43
|
+
```typescript
|
|
44
|
+
import { hello } from "@heiwa4126/hello5";
|
|
45
|
+
|
|
46
|
+
console.log(hello()); // "Hello!"
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### As a CLI tool
|
|
50
|
+
|
|
51
|
+
After installation, you can use the CLI command:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
heiwa4126-hello5
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Development
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
# Install dependencies
|
|
61
|
+
npm install
|
|
62
|
+
|
|
63
|
+
# Build the project
|
|
64
|
+
npm run build
|
|
65
|
+
|
|
66
|
+
# Run tests
|
|
67
|
+
npm test
|
|
68
|
+
|
|
69
|
+
# Clean build artifacts
|
|
70
|
+
npm run clean
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Build Output
|
|
74
|
+
|
|
75
|
+
The project builds to both ES modules and CommonJS formats in a flat structure:
|
|
76
|
+
|
|
77
|
+
- `dist/` - Both ES modules (`.js`) and CommonJS (`.cjs`) files
|
|
78
|
+
|
|
79
|
+
## Scripts
|
|
80
|
+
|
|
81
|
+
- `npm run build` - Build both ESM and CJS versions
|
|
82
|
+
- `npm run test:watch` - Run tests in watch mode
|
|
83
|
+
- `npm test` - Run tests once
|
|
84
|
+
- `npm run clean` - Remove build artifacts
|
|
85
|
+
|
|
86
|
+
## License
|
|
87
|
+
|
|
88
|
+
MIT
|
|
89
|
+
|
|
90
|
+
## Note
|
|
91
|
+
|
|
92
|
+
[NOTE-ja.md](https://github.com/heiwa4126/heiwa4126-hello5/blob/main/NOTE-ja.md) (on GitHub)
|
|
93
|
+
これがこのプロジェクトの本体。
|
package/dist/hello.cjs
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
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 });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var hello_exports = {};
|
|
20
|
+
__export(hello_exports, {
|
|
21
|
+
hello: () => hello
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(hello_exports);
|
|
24
|
+
function hello() {
|
|
25
|
+
return "Hello!";
|
|
26
|
+
}
|
|
27
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
28
|
+
0 && (module.exports = {
|
|
29
|
+
hello
|
|
30
|
+
});
|
|
31
|
+
//# sourceMappingURL=hello.cjs.map
|
package/dist/hello.d.ts
ADDED
package/dist/hello.js
ADDED
package/dist/main.cjs
ADDED
package/dist/main.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
package/dist/main.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@heiwa4126/hello5",
|
|
3
|
+
"version": "0.0.1-rc.0",
|
|
4
|
+
"description": "TypeScript hello world library with dual ES modules/CommonJS support. Features GitHub Actions trusted publishing to npmjs with Sigstore attestation.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/hello.cjs",
|
|
7
|
+
"module": "./dist/hello.js",
|
|
8
|
+
"types": "./dist/hello.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/hello.d.ts",
|
|
12
|
+
"import": "./dist/hello.js",
|
|
13
|
+
"require": "./dist/hello.cjs"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"bin": {
|
|
17
|
+
"heiwa4126-hello5": "dist/main.js"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist/**/*.js",
|
|
21
|
+
"dist/**/*.cjs",
|
|
22
|
+
"dist/**/*.d.ts",
|
|
23
|
+
"!dist/**/*.map"
|
|
24
|
+
],
|
|
25
|
+
"keywords": [
|
|
26
|
+
"aws cdk",
|
|
27
|
+
"utilities",
|
|
28
|
+
"cli",
|
|
29
|
+
"typescript",
|
|
30
|
+
"esm",
|
|
31
|
+
"sigstore",
|
|
32
|
+
"trusted-publishing",
|
|
33
|
+
"github-actions"
|
|
34
|
+
],
|
|
35
|
+
"author": "heiwa4126 <heiwa4126@gmail.com>",
|
|
36
|
+
"repository": {
|
|
37
|
+
"type": "git",
|
|
38
|
+
"url": "git+https://github.com/heiwa4126/heiwa4126-hello5.git"
|
|
39
|
+
},
|
|
40
|
+
"license": "MIT",
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@biomejs/biome": "^2.2.6",
|
|
43
|
+
"@heiwa4126/hello5": "file:.",
|
|
44
|
+
"@types/node": "^24.8.1",
|
|
45
|
+
"ts-node": "^10.9.2",
|
|
46
|
+
"tsup": "^8.5.0",
|
|
47
|
+
"typescript": "^5.9.3",
|
|
48
|
+
"vitest": "^4.0.8"
|
|
49
|
+
},
|
|
50
|
+
"engines": {
|
|
51
|
+
"node": ">=18.0.0"
|
|
52
|
+
}
|
|
53
|
+
}
|