examples/dependencies/__snapshots__/integration.test.ts.snap
// Vitest Snapshot v1
exports[`dependencies > dist 1`] = `
[
"index.cjs",
"index.js",
]
`;
exports[`dependencies > dist/index.cjs 1`] = `
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var src_exports = {};
__export(src_exports, {
hello: () => hello
});
module.exports = __toCommonJS(src_exports);
// ../../node_modules/strip-ansi/index.js
var import_ansi_regex = __toESM(require("ansi-regex"), 1);
function stripAnsi(string) {
if (typeof string !== "string") {
throw new TypeError(\`Expected a \\\`string\\\`, got \\\`\${typeof string}\\\`\`);
}
return string.replace((0, import_ansi_regex.default)(), "");
}
__name(stripAnsi, "stripAnsi");
// src/hello.ts
function hello(name) {
return \`Hello, \${stripAnsi(name)}\`;
}
__name(hello, "hello");
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
hello
});
`;
exports[`dependencies > dist/index.js 1`] = `
// ../../node_modules/strip-ansi/index.js
import ansiRegex from "ansi-regex";
function stripAnsi(string) {
if (typeof string !== "string") {
throw new TypeError(\`Expected a \\\`string\\\`, got \\\`\${typeof string}\\\`\`);
}
return string.replace(ansiRegex(), "");
}
// src/hello.ts
function hello(name) {
return \`Hello, \${stripAnsi(name)}\`;
}
export {
hello
};
`;
exports[`dependencies > logs 1`] = `
✔ Resolving build manifests
─ ℹ Checking 'action.yml'
─ ℹ Checking 'package.json'
✔ Run preparations
─ ℹ Removing 'dist' directory
✔ Making bundle from 'package.json'
› ✔ Parsing 'package.json'
─ ℹ Using ".dependencies" as external: ansi-regex
› ✔ Making '.main' entry bundle
─ ℹ Setting entry point: src/index.ts
─ ℹ Setting output file: dist/index.cjs
› ✔ Making '.module' entry bundle
─ ℹ Setting entry point: src/index.ts
─ ℹ Setting output file: dist/index.js
─ ℹ Setting build target: chrome<version>, edge<version>, firefox<version>, ios<version>, safari<version>
------
Exit Code: 0
`;