diff --git a/examples/dts-inspector/CHANGELOG.md b/examples/dts-inspector/CHANGELOG.md index 3e67b0d8e..772721b92 100644 --- a/examples/dts-inspector/CHANGELOG.md +++ b/examples/dts-inspector/CHANGELOG.md @@ -1,5 +1,12 @@ # dts-inspector +## 1.0.17 + +### Patch Changes + +- Updated dependencies [fa65a0f] + - @openfn/describe-package@0.0.20 + ## 1.0.16 ### Patch Changes diff --git a/examples/dts-inspector/package.json b/examples/dts-inspector/package.json index eeeff65ae..cd76cda36 100644 --- a/examples/dts-inspector/package.json +++ b/examples/dts-inspector/package.json @@ -1,6 +1,6 @@ { "name": "dts-inspector", - "version": "1.0.16", + "version": "1.0.17", "description": "", "main": "index.js", "type": "module", diff --git a/integration-tests/worker/CHANGELOG.md b/integration-tests/worker/CHANGELOG.md index 6b97ba9f3..0f0d78028 100644 --- a/integration-tests/worker/CHANGELOG.md +++ b/integration-tests/worker/CHANGELOG.md @@ -1,5 +1,13 @@ # @openfn/integration-tests-worker +## 1.0.48 + +### Patch Changes + +- @openfn/engine-multi@1.1.11 +- @openfn/lightning-mock@2.0.11 +- @openfn/ws-worker@1.2.1 + ## 1.0.47 ### Patch Changes diff --git a/integration-tests/worker/package.json b/integration-tests/worker/package.json index de3418a88..307ad888a 100644 --- a/integration-tests/worker/package.json +++ b/integration-tests/worker/package.json @@ -1,7 +1,7 @@ { "name": "@openfn/integration-tests-worker", "private": true, - "version": "1.0.47", + "version": "1.0.48", "description": "Lightning WOrker integration tests", "author": "Open Function Group ", "license": "ISC", diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 0e5d12544..8c1acdafa 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,13 @@ # @openfn/cli +## 1.4.1 + +### Patch Changes + +- Updated dependencies [fa65a0f] + - @openfn/describe-package@0.0.20 + - @openfn/compiler@0.1.3 + ## 1.4.0 ### Minor Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index cd63b17ed..0abd20b74 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@openfn/cli", - "version": "1.4.0", + "version": "1.4.1", "description": "CLI devtools for the openfn toolchain.", "engines": { "node": ">=18", diff --git a/packages/compiler/CHANGELOG.md b/packages/compiler/CHANGELOG.md index aa102a6b5..ee97e9517 100644 --- a/packages/compiler/CHANGELOG.md +++ b/packages/compiler/CHANGELOG.md @@ -1,5 +1,12 @@ # @openfn/compiler +## 0.1.3 + +### Patch Changes + +- Updated dependencies [fa65a0f] + - @openfn/describe-package@0.0.20 + ## 0.1.2 ### Patch Changes diff --git a/packages/compiler/package.json b/packages/compiler/package.json index c8acded16..4b268e895 100644 --- a/packages/compiler/package.json +++ b/packages/compiler/package.json @@ -1,6 +1,6 @@ { "name": "@openfn/compiler", - "version": "0.1.2", + "version": "0.1.3", "description": "Compiler and language tooling for openfn jobs.", "author": "Open Function Group ", "license": "ISC", diff --git a/packages/describe-package/CHANGELOG.md b/packages/describe-package/CHANGELOG.md index 068dc7f75..29d28d119 100644 --- a/packages/describe-package/CHANGELOG.md +++ b/packages/describe-package/CHANGELOG.md @@ -1,5 +1,11 @@ # @openfn/describe-package +## 0.0.20 + +### Patch Changes + +- fa65a0f: Describe anything with an @function tag, consistent with docsite + ## 0.0.19 ### Patch Changes diff --git a/packages/describe-package/package.json b/packages/describe-package/package.json index 8ac190cd1..64c23519a 100644 --- a/packages/describe-package/package.json +++ b/packages/describe-package/package.json @@ -1,6 +1,6 @@ { "name": "@openfn/describe-package", - "version": "0.0.19", + "version": "0.0.20", "description": "Utilities to inspect an npm package.", "author": "Open Function Group ", "license": "ISC", @@ -32,7 +32,8 @@ "build:worker": "tsm esbuild-worker.ts", "build:node": "tsup --config tsup.config.js src/index.ts", "build": "pnpm clean && pnpm build:node && pnpm build:worker", - "pack": "pnpm pack --pack-destination ../../dist" + "pack": "pnpm pack --pack-destination ../../dist", + "cli": "npx tsx src/cli.ts" }, "keywords": [], "devDependencies": { @@ -44,7 +45,7 @@ "esbuild": "^0.18.14", "rimraf": "^3.0.2", "threads": "1.7.0", - "ts-node": "^10.9.1", + "ts-node": "^10.9.2", "tslib": "^2.4.0", "tsm": "^2.2.1", "tsup": "^7.2.0" diff --git a/packages/describe-package/src/api.ts b/packages/describe-package/src/api.ts index a49a006f9..c34ac856f 100644 --- a/packages/describe-package/src/api.ts +++ b/packages/describe-package/src/api.ts @@ -64,7 +64,7 @@ export type ParameterDescription = { */ export const describePackage = async ( specifier: string, - _options: Options + _options: Options = {} ): Promise => { const { name, version } = getNameAndVersion(specifier); const project = new Project(); diff --git a/packages/describe-package/src/cli.ts b/packages/describe-package/src/cli.ts new file mode 100644 index 000000000..1c4eea599 --- /dev/null +++ b/packages/describe-package/src/cli.ts @@ -0,0 +1,12 @@ +import { describePackage } from './api'; + +const a = process.argv[2]; + +async function run(specifier: string) { + const result = await describePackage(specifier, {}); + + console.log(result); +} + +console.log('GENERATING FOR', a); +run(a); diff --git a/packages/describe-package/src/describe-project.ts b/packages/describe-package/src/describe-project.ts index 18f9f7593..a7dea2a2b 100644 --- a/packages/describe-package/src/describe-project.ts +++ b/packages/describe-package/src/describe-project.ts @@ -97,7 +97,7 @@ const describeProject = ( return true; } // Return all export aliases and public symbols - return symbol.isExportAlias || symbol.isPublic; + return symbol.isExportAlias || symbol.hasFunctionTag; }) .reduce((symbols, symbol) => { if (symbol.isFunctionDeclaration) { diff --git a/packages/describe-package/src/typescript/wrapped-symbol.ts b/packages/describe-package/src/typescript/wrapped-symbol.ts index 09d30453b..96c021a47 100644 --- a/packages/describe-package/src/typescript/wrapped-symbol.ts +++ b/packages/describe-package/src/typescript/wrapped-symbol.ts @@ -86,10 +86,11 @@ export class WrappedSymbol { return this.symbol.valueDeclaration?.type; } - // A function is private unless it has a public tag - public get isPublic(): boolean { - return this.jsDocTags.some( - (tag: ts.JSDocTag) => tag.tagName.escapedText === 'public' + public get hasFunctionTag(): boolean { + return Boolean( + this.jsDocTags.find( + (tag: ts.JSDocTag) => tag.tagName.escapedText === 'function' + ) ); } diff --git a/packages/describe-package/test/describe-project.test.ts b/packages/describe-package/test/describe-project.test.ts index 0a95bbb83..2fe9e0936 100644 --- a/packages/describe-package/test/describe-project.test.ts +++ b/packages/describe-package/test/describe-project.test.ts @@ -74,7 +74,7 @@ test('Parse an empty file', async (t) => { test('Recognise a namespace', async (t) => { const ns = get('flavours'); - t.is(ns.type, 'namespace') + t.is(ns.type, 'namespace'); // Note that we don't do a lot with the namespace right now - we just acknowledge that its there -}); \ No newline at end of file +}); diff --git a/packages/describe-package/test/fixtures/stroopwafel.d.ts b/packages/describe-package/test/fixtures/stroopwafel.d.ts index 0a1fc1327..0522400c1 100644 --- a/packages/describe-package/test/fixtures/stroopwafel.d.ts +++ b/packages/describe-package/test/fixtures/stroopwafel.d.ts @@ -1,6 +1,6 @@ /** * Returns a traditional stroopwafel - * @public + * @function * @example * traditional() */ @@ -8,7 +8,7 @@ export declare function traditional(): string; /** * Returns a flavoured stroopwafel - * @public + * @function * @param {string} flavour * @magic flavour - $.children[*] * @example @@ -18,7 +18,7 @@ export declare function oneFlavour(flavour: string): string; /** * Returns a many flavoured stroopwafel - * @public + * @function * @example * manyFlavours(['strawberry', 'cream']) * @example diff --git a/packages/engine-multi/CHANGELOG.md b/packages/engine-multi/CHANGELOG.md index d9669abe7..d0ff4ec17 100644 --- a/packages/engine-multi/CHANGELOG.md +++ b/packages/engine-multi/CHANGELOG.md @@ -1,5 +1,11 @@ # engine-multi +## 1.1.11 + +### Patch Changes + +- @openfn/compiler@0.1.3 + ## 1.1.10 ### Patch Changes diff --git a/packages/engine-multi/package.json b/packages/engine-multi/package.json index 5cea04b5b..2718f6903 100644 --- a/packages/engine-multi/package.json +++ b/packages/engine-multi/package.json @@ -1,6 +1,6 @@ { "name": "@openfn/engine-multi", - "version": "1.1.10", + "version": "1.1.11", "description": "Multi-process runtime engine", "main": "dist/index.js", "type": "module", diff --git a/packages/lightning-mock/CHANGELOG.md b/packages/lightning-mock/CHANGELOG.md index 215312c48..3876f9d70 100644 --- a/packages/lightning-mock/CHANGELOG.md +++ b/packages/lightning-mock/CHANGELOG.md @@ -1,5 +1,11 @@ # @openfn/lightning-mock +## 2.0.11 + +### Patch Changes + +- @openfn/engine-multi@1.1.11 + ## 2.0.10 ### Patch Changes diff --git a/packages/lightning-mock/package.json b/packages/lightning-mock/package.json index 3dc5be13e..f77e4a338 100644 --- a/packages/lightning-mock/package.json +++ b/packages/lightning-mock/package.json @@ -1,6 +1,6 @@ { "name": "@openfn/lightning-mock", - "version": "2.0.10", + "version": "2.0.11", "private": true, "description": "A mock Lightning server", "main": "dist/index.js", diff --git a/packages/ws-worker/CHANGELOG.md b/packages/ws-worker/CHANGELOG.md index 86d6ffff1..96fb7d068 100644 --- a/packages/ws-worker/CHANGELOG.md +++ b/packages/ws-worker/CHANGELOG.md @@ -1,5 +1,11 @@ # ws-worker +## 1.2.1 + +### Patch Changes + +- @openfn/engine-multi@1.1.11 + ## 1.2.0 ### Minor Changes diff --git a/packages/ws-worker/package.json b/packages/ws-worker/package.json index 1ed777fdb..d9bb4c738 100644 --- a/packages/ws-worker/package.json +++ b/packages/ws-worker/package.json @@ -1,6 +1,6 @@ { "name": "@openfn/ws-worker", - "version": "1.2.0", + "version": "1.2.1", "description": "A Websocket Worker to connect Lightning to a Runtime Engine", "main": "dist/index.js", "type": "module", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 18912389d..d02d70445 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -373,8 +373,8 @@ importers: specifier: 1.7.0 version: 1.7.0 ts-node: - specifier: ^10.9.1 - version: 10.9.1(@types/node@18.15.13)(typescript@5.1.6) + specifier: ^10.9.2 + version: 10.9.2(@types/node@18.15.13)(typescript@5.1.6) tslib: specifier: ^2.4.0 version: 2.4.0 @@ -383,7 +383,7 @@ importers: version: 2.2.2 tsup: specifier: ^7.2.0 - version: 7.2.0(ts-node@10.9.1)(typescript@5.1.6) + version: 7.2.0(ts-node@10.9.2)(typescript@5.1.6) packages/engine-multi: dependencies: @@ -4229,7 +4229,7 @@ packages: requiresBuild: true dependencies: bindings: 1.5.0 - nan: 2.18.0 + nan: 2.20.0 dev: true optional: true @@ -5650,8 +5650,8 @@ packages: thenify-all: 1.6.0 dev: true - /nan@2.18.0: - resolution: {integrity: sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==} + /nan@2.20.0: + resolution: {integrity: sha512-bk3gXBZDGILuuo/6sKtr0DQmSThYHLtNCdSdXk9YkxD/jK6X2vmCyyXBBxyqZ4XcnzTyYEAThfX3DCEnLf6igw==} requiresBuild: true dev: true optional: true @@ -6281,6 +6281,23 @@ packages: yaml: 2.3.1 dev: true + /postcss-load-config@4.0.1(ts-node@10.9.2): + resolution: {integrity: sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==} + engines: {node: '>= 14'} + peerDependencies: + postcss: '>=8.0.9' + ts-node: '>=9.0.0' + peerDependenciesMeta: + postcss: + optional: true + ts-node: + optional: true + dependencies: + lilconfig: 2.1.0 + ts-node: 10.9.2(@types/node@18.15.13)(typescript@5.1.6) + yaml: 2.3.1 + dev: true + /postcss-nested@5.0.6(postcss@8.4.16): resolution: {integrity: sha512-rKqm2Fk0KbA8Vt3AdGN0FB9OBOMDVajMG6ZCf/GoHgdxUJ4sBFp0A/uMIRm+MJUdo33YXEtjqIz8u7DAp8B7DA==} engines: {node: '>=12.0'} @@ -7462,6 +7479,37 @@ packages: yn: 3.1.1 dev: true + /ts-node@10.9.2(@types/node@18.15.13)(typescript@5.1.6): + resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.9 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.3 + '@types/node': 18.15.13 + acorn: 8.10.0 + acorn-walk: 8.2.0 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 5.1.6 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + dev: true + /tslib@2.4.0: resolution: {integrity: sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==} @@ -7586,6 +7634,42 @@ packages: - ts-node dev: true + /tsup@7.2.0(ts-node@10.9.2)(typescript@5.1.6): + resolution: {integrity: sha512-vDHlczXbgUvY3rWvqFEbSqmC1L7woozbzngMqTtL2PGBODTtWlRwGDDawhvWzr5c1QjKe4OAKqJGfE1xeXUvtQ==} + engines: {node: '>=16.14'} + hasBin: true + peerDependencies: + '@swc/core': ^1 + postcss: ^8.4.12 + typescript: '>=4.1.0' + peerDependenciesMeta: + '@swc/core': + optional: true + postcss: + optional: true + typescript: + optional: true + dependencies: + bundle-require: 4.0.1(esbuild@0.18.20) + cac: 6.7.14 + chokidar: 3.5.3 + debug: 4.3.4 + esbuild: 0.18.20 + execa: 5.1.1 + globby: 11.1.0 + joycon: 3.1.1 + postcss-load-config: 4.0.1(ts-node@10.9.2) + resolve-from: 5.0.0 + rollup: 3.27.2 + source-map: 0.8.0-beta.0 + sucrase: 3.34.0 + tree-kill: 1.2.2 + typescript: 5.1.6 + transitivePeerDependencies: + - supports-color + - ts-node + dev: true + /tty-table@4.1.6: resolution: {integrity: sha512-kRj5CBzOrakV4VRRY5kUWbNYvo/FpOsz65DzI5op9P+cHov3+IqPbo1JE1ZnQGkHdZgNFDsrEjrfqqy/Ply9fw==} engines: {node: '>=8.0.0'}