examples/types-js/__snapshots__/integration.test.ts.snap
// Vitest Snapshot v1
exports[`types-js > dist 1`] = `
[
"hello.cjs",
"hello.d.ts",
]
`;
exports[`types-js > dist/hello.cjs 1`] = `
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/hello.js
var hello_exports = {};
__export(hello_exports, {
hello: () => hello
});
module.exports = __toCommonJS(hello_exports);
function hello(name) {
return \`Hello, \${name}\`;
}
__name(hello, "hello");
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
hello
});
`;
exports[`types-js > dist/hello.d.ts 1`] = `
/**
* @param {string} name
* @returns {string}
*/
export declare function hello(name: string): string;
export { }
`;
exports[`types-js > logs 1`] = `
✔ Resolving build manifests
─ ℹ Checking 'action.yml'
─ ℹ Checking 'package.json'
✔ Run preparations
─ ℹ Removing 'dist' directory
✔ Making bundle from 'package.json'
› ✔ Parsing 'package.json'
› ✔ Making '.main' entry bundle
─ ℹ Setting entry point: src/hello.js
─ ℹ Setting output file: dist/hello.cjs
› ✔ Making '.types' entry bundle
─ ℹ Generating 'd.ts' files
─ ℹ Bundle into single 'd.ts' file
------
Exit Code: 0
`;