feat: use ESM (#197)

This commit is contained in:
Lucas Fernandes Nogueira
2021-12-10 21:36:25 -03:00
committed by GitHub
parent 9583d603e5
commit d1822740b1
9 changed files with 28 additions and 36 deletions

File diff suppressed because one or more lines are too long

3
packages/action/dist/package.json vendored Normal file
View File

@@ -0,0 +1,3 @@
{
"type": "module"
}

View File

@@ -5,6 +5,7 @@
"author": "Lucas Nogueira <lucas@tauri.studio>",
"license": "MIT",
"main": "dist/index.js",
"type": "module",
"scripts": {
"build": "ncc build src/index.ts -o dist -m"
},

View File

@@ -1,2 +1,2 @@
const { run } = require('../dist')
import { run } from '../dist/index.js'
run()

View File

@@ -5,6 +5,7 @@
"author": "Lucas Nogueira <lucas@tauri.studio>",
"license": "MIT",
"main": "dist",
"type": "module",
"scripts": {
"build": "rollup --config",
"prepublishOnly": "rollup --config"
@@ -14,7 +15,7 @@
"url": "git+https://github.com/tauri-apps/tauri-action.git"
},
"dependencies": {
"@tauri-apps/action-core": "0.1.1",
"@tauri-apps/action-core": "0.2.0",
"minimist": "1.2.5",
"tslib": "2.3.1"
},

View File

@@ -7,7 +7,7 @@ export default {
input: { index: "index.ts" },
output: {
dir: "dist",
format: "cjs",
format: "esm",
entryFileNames: "[name].js",
exports: "named",
},

View File

@@ -4,6 +4,7 @@
"author": "Lucas Nogueira <lucas@tauri.studio>",
"license": "MIT",
"main": "dist",
"type": "module",
"scripts": {
"build": "rollup --config",
"prepublishOnly": "rollup --config"

View File

@@ -7,7 +7,7 @@ export default {
input: { index: "index.ts" },
output: {
dir: "dist",
format: "cjs",
format: "esm",
entryFileNames: "[name].js",
exports: "named",
},

View File

@@ -277,15 +277,6 @@
estree-walker "^1.0.1"
picomatch "^2.2.2"
"@tauri-apps/action-core@0.1.1":
version "0.1.1"
resolved "https://registry.yarnpkg.com/@tauri-apps/action-core/-/action-core-0.1.1.tgz#858019032e0ac3fcd44c334becee3654a3fcf20f"
integrity sha512-gFMSZRfDofZGCLPVoHNPz2Y+NA9TiMkecUXP87e2hIZsr5rl6MD+OlCmrX5hh7V5zPIqXPpmQNQt/j7OWLmX/g==
dependencies:
"@iarna/toml" "2.2.5"
execa "5.0.0"
tslib "2.2.0"
"@tauri-apps/toml@^2.2.4":
version "2.2.4"
resolved "https://registry.yarnpkg.com/@tauri-apps/toml/-/toml-2.2.4.tgz#2b4f637aded7fc3a7302724605682c8fa3ac7505"
@@ -681,21 +672,6 @@ estree-walker@^1.0.1:
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-1.0.1.tgz#31bc5d612c96b704106b477e6dd5d8aa138cb700"
integrity sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==
execa@5.0.0, execa@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/execa/-/execa-5.0.0.tgz#4029b0007998a841fbd1032e5f4de86a3c1e3376"
integrity sha512-ov6w/2LCiuyO4RLYGdpFGjkcs0wMTgGE8PrkTHikeUy5iJekXyPIKUjifk5CsE0pt7sMCrMZ3YNqoCj6idQOnQ==
dependencies:
cross-spawn "^7.0.3"
get-stream "^6.0.0"
human-signals "^2.1.0"
is-stream "^2.0.0"
merge-stream "^2.0.0"
npm-run-path "^4.0.1"
onetime "^5.1.2"
signal-exit "^3.0.3"
strip-final-newline "^2.0.0"
execa@6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/execa/-/execa-6.0.0.tgz#598b46f09ae44f5d8097a30cfb1681d0f0371503"
@@ -711,6 +687,21 @@ execa@6.0.0:
signal-exit "^3.0.5"
strip-final-newline "^3.0.0"
execa@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/execa/-/execa-5.0.0.tgz#4029b0007998a841fbd1032e5f4de86a3c1e3376"
integrity sha512-ov6w/2LCiuyO4RLYGdpFGjkcs0wMTgGE8PrkTHikeUy5iJekXyPIKUjifk5CsE0pt7sMCrMZ3YNqoCj6idQOnQ==
dependencies:
cross-spawn "^7.0.3"
get-stream "^6.0.0"
human-signals "^2.1.0"
is-stream "^2.0.0"
merge-stream "^2.0.0"
npm-run-path "^4.0.1"
onetime "^5.1.2"
signal-exit "^3.0.3"
strip-final-newline "^2.0.0"
extend@^3.0.0:
version "3.0.2"
resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa"
@@ -1761,11 +1752,6 @@ ts-typed-json@^0.3.2:
resolved "https://registry.yarnpkg.com/ts-typed-json/-/ts-typed-json-0.3.2.tgz#f4f20f45950bae0a383857f7b0a94187eca1b56a"
integrity sha512-Tdu3BWzaer7R5RvBIJcg9r8HrTZgpJmsX+1meXMJzYypbkj8NK2oJN0yvm4Dp/Iv6tzFa/L5jKRmEVTga6K3nA==
tslib@2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.2.0.tgz#fb2c475977e35e241311ede2693cee1ec6698f5c"
integrity sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==
tslib@2.3.1:
version "2.3.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01"