Skip to content

Commit

Permalink
fix(tsc): switch enext -> commonjs
Browse files Browse the repository at this point in the history
  • Loading branch information
VannaDii committed Jan 30, 2022
1 parent 549f04e commit 6294651
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
6 changes: 4 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
import { handleAction } from './lib';
handleAction();
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const lib_1 = require("./lib");
(0, lib_1.handleAction)();
12 changes: 8 additions & 4 deletions dist/lib.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import * as fs from 'fs';
import * as YAML from 'yaml';
import * as core from '@actions/core';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.handleAction = void 0;
const fs = require("fs");
const YAML = require("yaml");
const core = require("@actions/core");
function getOptions() {
return {
file: core.getInput('file', { required: true }),
Expand All @@ -10,7 +13,7 @@ function getOptions() {
append: core.getBooleanInput('append', { required: false }),
};
}
export function handleAction() {
function handleAction() {
try {
const opts = getOptions();
const yaml = YAML.parse(fs.readFileSync(opts.file, 'utf-8'));
Expand All @@ -35,3 +38,4 @@ export function handleAction() {
core.setFailed(error.message);
}
}
exports.handleAction = handleAction;
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"outDir": "dist",
"module": "ESNext",
"module": "CommonJS",
"target": "ESNext",
"lib": [
"ESNext"
Expand Down

0 comments on commit 6294651

Please sign in to comment.