Skip to content

Commit

Permalink
Move all files to source/ and test/ directories
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Sep 1, 2024
1 parent 6e8cf4e commit f2f3b6d
Show file tree
Hide file tree
Showing 16 changed files with 8 additions and 10 deletions.
8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"type": "module",
"exports": {
"types": "./index.d.ts",
"default": "./index.js"
"default": "./source/index.js"
},
"sideEffects": false,
"engines": {
Expand All @@ -23,10 +23,8 @@
"test": "xo && ava && tsc index.d.ts"
},
"files": [
"index.js",
"index.d.ts",
"iterable.js",
"windows.js"
"source/**/*.js",
"index.d.ts"
],
"keywords": [
"spawn",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env node
import process from 'node:process';
import nanoSpawn from '../index.js';
import nanoSpawn from '../../source/index.js';

await nanoSpawn(process.execPath, ['-p', 'process.execArgv'], {stdout: 'inherit'});
2 changes: 1 addition & 1 deletion fixtures/node-flags.js → test/fixtures/node-flags.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env node
import nanoSpawn from '../index.js';
import nanoSpawn from '../../source/index.js';

await nanoSpawn('node', ['-p', 'process.execArgv'], {stdout: 'inherit'});
2 changes: 1 addition & 1 deletion fixtures/node-version.js → test/fixtures/node-version.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env node
import nanoSpawn from '../index.js';
import nanoSpawn from '../../source/index.js';

await nanoSpawn('node', ['--version'], {stdout: 'inherit'});
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions test.js → test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import getNode from 'get-node';
import pathKey from 'path-key';
import {temporaryWriteTask} from 'tempy';
import {red} from 'yoctocolors';
import nanoSpawn from './index.js';
import nanoSpawn from '../source/index.js';

const isLinux = process.platform === 'linux';
const isWindows = process.platform === 'win32';
Expand Down Expand Up @@ -1103,7 +1103,7 @@ const testLocalBinaryExec = async (t, cwd) => {
};

test('options.preferLocal true runs local npm binaries', testLocalBinaryExec, undefined);
test('options.preferLocal true runs local npm binaries with options.cwd string', testLocalBinaryExec, './fixtures');
test('options.preferLocal true runs local npm binaries with options.cwd string', testLocalBinaryExec, fixturesPath);
test('options.preferLocal true runs local npm binaries with options.cwd URL', testLocalBinaryExec, FIXTURES_URL);

if (!isWindows) {
Expand Down

0 comments on commit f2f3b6d

Please sign in to comment.