Update dependencies
This commit is contained in:
parent
dfdfea5b92
commit
75aad0aa2b
4 changed files with 18 additions and 18 deletions
4
index.js
4
index.js
|
|
@ -2,7 +2,7 @@ import fs from 'node:fs';
|
|||
import path from 'node:path';
|
||||
import {pathToFileURL} from 'node:url';
|
||||
import escapeStringRegexp from 'escape-string-regexp';
|
||||
import execa from 'execa';
|
||||
import {execa} from 'execa';
|
||||
|
||||
const pkg = JSON.parse(fs.readFileSync(new URL('package.json', import.meta.url)));
|
||||
const help = `See https://github.com/avajs/typescript/blob/v${pkg.version}/README.md`;
|
||||
|
|
@ -182,7 +182,7 @@ export default function typescriptProvider({negotiateProtocol}) {
|
|||
useImport = importJs;
|
||||
}
|
||||
|
||||
return useImport ? import(pathToFileURL(rewritten)) : requireFn(rewritten); // eslint-disable-line node/no-unsupported-features/es-syntax
|
||||
return useImport ? import(pathToFileURL(rewritten)) : requireFn(rewritten);
|
||||
},
|
||||
};
|
||||
},
|
||||
|
|
|
|||
12
package.json
12
package.json
|
|
@ -24,14 +24,14 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"escape-string-regexp": "^5.0.0",
|
||||
"execa": "^5.1.1"
|
||||
"execa": "^7.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ava": "4.0.0-rc.1",
|
||||
"c8": "^7.10.0",
|
||||
"del": "^6.0.0",
|
||||
"typescript": "^4.4.4",
|
||||
"xo": "^0.46.3"
|
||||
"ava": "^5.2.0",
|
||||
"c8": "^7.13.0",
|
||||
"del": "^7.0.0",
|
||||
"typescript": "^4.9.5",
|
||||
"xo": "^0.53.1"
|
||||
},
|
||||
"c8": {
|
||||
"reporter": [
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import path from 'node:path';
|
||||
import {fileURLToPath} from 'node:url';
|
||||
import test from 'ava';
|
||||
import del from 'del';
|
||||
import execa from 'execa';
|
||||
import {deleteAsync} from 'del';
|
||||
import {execaNode} from 'execa';
|
||||
import createProviderMacro from './_with-provider.js';
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
|
|
@ -10,8 +10,8 @@ const withProvider = createProviderMacro('ava-3.2', '3.2.0', path.join(__dirname
|
|||
const withAltProvider = createProviderMacro('ava-3.2', '3.2.0', path.join(__dirname, 'broken-fixtures'));
|
||||
|
||||
test.before('deleting compiled files', async t => {
|
||||
t.log(await del('test/fixtures/typescript/compiled'));
|
||||
t.log(await del('test/broken-fixtures/typescript/compiled'));
|
||||
t.log(await deleteAsync('test/fixtures/typescript/compiled'));
|
||||
t.log(await deleteAsync('test/broken-fixtures/typescript/compiled'));
|
||||
});
|
||||
|
||||
const compile = async provider => ({
|
||||
|
|
@ -28,7 +28,7 @@ const compile = async provider => ({
|
|||
|
||||
test('worker(): load rewritten paths files', withProvider, async (t, provider) => {
|
||||
const {state} = await compile(provider);
|
||||
const {stdout, stderr} = await execa.node(
|
||||
const {stdout, stderr} = await execaNode(
|
||||
path.join(__dirname, 'fixtures/install-and-load'),
|
||||
[JSON.stringify({state}), path.join(__dirname, 'fixtures/ts', 'file.ts')],
|
||||
{cwd: path.join(__dirname, 'fixtures')},
|
||||
|
|
@ -42,7 +42,7 @@ test('worker(): load rewritten paths files', withProvider, async (t, provider) =
|
|||
|
||||
test('worker(): runs compiled files', withProvider, async (t, provider) => {
|
||||
const {state} = await compile(provider);
|
||||
const {stdout, stderr} = await execa.node(
|
||||
const {stdout, stderr} = await execaNode(
|
||||
path.join(__dirname, 'fixtures/install-and-load'),
|
||||
[JSON.stringify({state}), path.join(__dirname, 'fixtures/compiled', 'index.ts')],
|
||||
{cwd: path.join(__dirname, 'fixtures')},
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import path from 'node:path';
|
||||
import {fileURLToPath} from 'node:url';
|
||||
import test from 'ava';
|
||||
import execa from 'execa';
|
||||
import {execaNode} from 'execa';
|
||||
import createProviderMacro from './_with-provider.js';
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
|
|
@ -20,7 +20,7 @@ const setup = async provider => ({
|
|||
|
||||
test('worker(): load .cts', withProvider, async (t, provider) => {
|
||||
const {state} = await setup(provider);
|
||||
const {stdout, stderr} = await execa.node(
|
||||
const {stdout, stderr} = await execaNode(
|
||||
path.join(__dirname, 'fixtures/install-and-load'),
|
||||
[JSON.stringify({state}), path.join(__dirname, 'fixtures/load', 'index.cts')],
|
||||
{cwd: path.join(__dirname, 'fixtures')},
|
||||
|
|
@ -34,7 +34,7 @@ test('worker(): load .cts', withProvider, async (t, provider) => {
|
|||
|
||||
test('worker(): load .mts', withProvider, async (t, provider) => {
|
||||
const {state} = await setup(provider);
|
||||
const {stdout, stderr} = await execa.node(
|
||||
const {stdout, stderr} = await execaNode(
|
||||
path.join(__dirname, 'fixtures/install-and-load'),
|
||||
[JSON.stringify({state}), path.join(__dirname, 'fixtures/load', 'index.mts')],
|
||||
{cwd: path.join(__dirname, 'fixtures')},
|
||||
|
|
@ -48,7 +48,7 @@ test('worker(): load .mts', withProvider, async (t, provider) => {
|
|||
|
||||
test('worker(): load .ts', withProvider, async (t, provider) => {
|
||||
const {state} = await setup(provider);
|
||||
const {stdout, stderr} = await execa.node(
|
||||
const {stdout, stderr} = await execaNode(
|
||||
path.join(__dirname, 'fixtures/install-and-load'),
|
||||
[JSON.stringify({extensionsToLoadAsModules: ['js'], state}), path.join(__dirname, 'fixtures/load', 'index.ts')],
|
||||
{cwd: path.join(__dirname, 'fixtures')},
|
||||
|
|
|
|||
Loading…
Reference in a new issue