Skip to content

Commit 8a5ab95

Browse files
committedJun 7, 2024··
fix: mix sync methods to default export
1 parent 39520e1 commit 8a5ab95

File tree

5 files changed

+17
-7
lines changed

5 files changed

+17
-7
lines changed
 

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@webpod/ps",
3-
"version": "0.0.0-beta.4",
3+
"version": "0.0.0-beta.5",
44
"description": "A process lookup utility",
55
"publishConfig": {
66
"access": "public"

‎src/main/ts/index.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { kill, lookup, tree } from './ps.js'
1+
import { kill, lookup, lookupSync, tree, treeSync } from './ps.js'
22

33
export type * from './ps.js'
4-
export { kill, lookup, tree } from './ps.js'
5-
export default { lookup, kill, tree }
4+
export { kill, lookup, lookupSync, tree, treeSync } from './ps.js'
5+
export default { kill, lookup, lookupSync, tree, treeSync }

‎src/test/js/index.test.cjs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
const assert = require('node:assert')
22
const { describe, it } = require('node:test')
3-
const { lookup, kill } = require('@webpod/ps')
3+
const { lookup, kill, tree } = require('@webpod/ps')
44

55
describe('cjs index()', () => {
66
it('has proper exports', () => {
77
assert.equal(typeof lookup, 'function')
8+
assert.equal(typeof lookup.sync, 'function')
9+
assert.equal(typeof tree, 'function')
10+
assert.equal(typeof tree.sync, 'function')
811
assert.equal(typeof kill, 'function')
912
})
1013
})

‎src/test/js/index.test.mjs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
import assert from 'node:assert'
22
import { describe, it } from 'node:test'
3-
import { lookup, kill } from '@webpod/ps'
3+
import { lookup, kill, tree } from '@webpod/ps'
44

55
describe('mjs index', () => {
66
it('has proper exports', () => {
77
assert.equal(typeof lookup, 'function')
8+
assert.equal(typeof lookup.sync, 'function')
9+
assert.equal(typeof tree, 'function')
10+
assert.equal(typeof tree.sync, 'function')
811
assert.equal(typeof kill, 'function')
912
})
1013
})

‎src/test/ts/index.test.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
import * as assert from 'node:assert'
22
import { describe, it } from 'node:test'
3-
import ps, { kill, lookup, tree } from '../../main/ts/index.ts'
3+
import ps, { kill, lookup, tree, treeSync, lookupSync } from '../../main/ts/index.ts'
44

55
describe('index', () => {
66
it('has proper exports', () => {
77
assert.equal(ps.lookup, lookup)
8+
assert.equal(ps.lookup.sync, lookupSync)
89
assert.equal(ps.kill, kill)
910
assert.equal(ps.tree, tree)
11+
assert.equal(ps.tree.sync, treeSync)
1012
assert.equal(typeof lookup, 'function')
13+
assert.equal(typeof lookupSync, 'function')
1114
assert.equal(typeof kill, 'function')
1215
assert.equal(typeof tree, 'function')
16+
assert.equal(typeof treeSync, 'function')
1317
})
1418
})

0 commit comments

Comments
 (0)
Please sign in to comment.