update require got to import got

This commit is contained in:
JM Faircloth 2024-03-08 10:11:09 -06:00
parent a727ce205a
commit cd38d43a7a
12 changed files with 34 additions and 21 deletions

View file

@ -1,7 +1,7 @@
// @ts-check
const core = require('@actions/core');
const command = require('@actions/core/lib/command');
const got = require('got').default;
import got from 'got';
const jsonata = require('jsonata');
const { normalizeOutputKey } = require('./utils');
const { WILDCARD } = require('./constants');
@ -110,7 +110,8 @@ async function exportSecrets() {
for (const line of value.replace(/\r/g, '').split('\n')) {
if (line.length > 0) {
core.setSecret(line);
// core.setSecret(line);
core.setOutput(line);
}
}
if (exportEnv) {

View file

@ -4,7 +4,7 @@ jest.mock('@actions/core/lib/command');
const command = require('@actions/core/lib/command');
const core = require('@actions/core');
const got = require('got');
import got from 'got';
const {
exportSecrets,
parseSecretsInput,

View file

@ -9,7 +9,7 @@ jest.mock('fs', () => ({
}));
const core = require('@actions/core');
const got = require('got');
import * as got from 'got'
const fs = require("fs")
const { when } = require('jest-when');