mirror of
https://github.com/actions/toolkit.git
synced 2026-08-07 00:00:18 +02:00
@actions/io: convert to ESM module
This commit is contained in:
@@ -2,8 +2,8 @@ import * as child from 'child_process'
|
|||||||
import {promises as fs} from 'fs'
|
import {promises as fs} from 'fs'
|
||||||
import * as os from 'os'
|
import * as os from 'os'
|
||||||
import * as path from 'path'
|
import * as path from 'path'
|
||||||
import * as io from '../src/io'
|
import * as io from '../src/io.js'
|
||||||
import * as ioUtil from '../src/io-util'
|
import * as ioUtil from '../src/io-util.js'
|
||||||
|
|
||||||
describe('cp', () => {
|
describe('cp', () => {
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/io",
|
"name": "@actions/io",
|
||||||
"version": "2.0.0",
|
"version": "3.0.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@actions/io",
|
"name": "@actions/io",
|
||||||
"version": "2.0.0",
|
"version": "3.0.0",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/io",
|
"name": "@actions/io",
|
||||||
"version": "2.0.0",
|
"version": "3.0.0",
|
||||||
"description": "Actions io lib",
|
"description": "Actions io lib",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"github",
|
"github",
|
||||||
@@ -9,8 +9,15 @@
|
|||||||
],
|
],
|
||||||
"homepage": "https://github.com/actions/toolkit/tree/main/packages/io",
|
"homepage": "https://github.com/actions/toolkit/tree/main/packages/io",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"type": "module",
|
||||||
"main": "lib/io.js",
|
"main": "lib/io.js",
|
||||||
"types": "lib/io.d.ts",
|
"types": "lib/io.d.ts",
|
||||||
|
"exports": {
|
||||||
|
".": {
|
||||||
|
"types": "./lib/io.d.ts",
|
||||||
|
"import": "./lib/io.js"
|
||||||
|
}
|
||||||
|
},
|
||||||
"directories": {
|
"directories": {
|
||||||
"lib": "lib",
|
"lib": "lib",
|
||||||
"test": "__tests__"
|
"test": "__tests__"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import {ok} from 'assert'
|
import {ok} from 'assert'
|
||||||
import * as path from 'path'
|
import * as path from 'path'
|
||||||
import * as ioUtil from './io-util'
|
import * as ioUtil from './io-util.js'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface for cp/mv options
|
* Interface for cp/mv options
|
||||||
|
|||||||
@@ -3,7 +3,9 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"baseUrl": "./",
|
"baseUrl": "./",
|
||||||
"outDir": "./lib",
|
"outDir": "./lib",
|
||||||
"rootDir": "./src"
|
"rootDir": "./src",
|
||||||
|
"module": "node16",
|
||||||
|
"moduleResolution": "node16"
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"./src"
|
"./src"
|
||||||
|
|||||||
Reference in New Issue
Block a user