-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/1-0' of github.com-josephjclark:OpenFn/kit into…
… release/1-0
- Loading branch information
Showing
18 changed files
with
221 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@openfn/cli': major | ||
--- | ||
|
||
Autoinstall adaptors by default (pass `--no-autoinstall` to disable) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@openfn/ws-worker': patch | ||
--- | ||
|
||
Better error handling for invalid dataclips |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ import printVersions from '../../src/util/print-versions'; | |
|
||
const root = path.resolve('package.json'); | ||
|
||
test('print versions for node, cli, runtime and compiler', async (t) => { | ||
test('print versions for node and cli', async (t) => { | ||
const logger = createMockLogger('', { level: 'info' }); | ||
await printVersions(logger); | ||
|
||
|
@@ -17,12 +17,13 @@ test('print versions for node, cli, runtime and compiler', async (t) => { | |
// very crude testing but it's ok to test the intent here | ||
t.regex(message, /Versions:/); | ||
t.regex(message, /cli/); | ||
t.regex(message, /runtime/); | ||
t.regex(message, /compiler/); | ||
t.regex(message, /node/); | ||
t.notRegex(message, /adaptor/); | ||
t.notRegex(message, /compiler/); | ||
t.notRegex(message, /runtime/); | ||
}); | ||
|
||
test('print versions for node, cli, runtime, compiler and adaptor', async (t) => { | ||
test('print versions for node, cli and adaptor', async (t) => { | ||
const logger = createMockLogger('', { level: 'info' }); | ||
await printVersions(logger, { adaptors: ['http'] }); | ||
|
||
|
@@ -31,27 +32,39 @@ test('print versions for node, cli, runtime, compiler and adaptor', async (t) => | |
|
||
t.regex(message, /Versions:/); | ||
t.regex(message, /cli/); | ||
t.regex(message, /node/); | ||
t.regex(message, /http .+ latest/); | ||
}); | ||
|
||
test('print versions for node, cli, components and adaptor', async (t) => { | ||
const logger = createMockLogger('', { level: 'info' }); | ||
await printVersions(logger, { adaptors: ['http'] }, true); | ||
|
||
const last = logger._parse(logger._last); | ||
const message = last.message as string; | ||
|
||
t.regex(message, /Versions:/); | ||
t.regex(message, /cli/); | ||
t.regex(message, /node/); | ||
t.regex(message, /runtime/); | ||
t.regex(message, /compiler/); | ||
t.regex(message, /node/); | ||
t.regex(message, /http .+ latest/); | ||
}); | ||
|
||
test('print versions for node, cli, runtime, compiler and adaptor with version', async (t) => { | ||
test('print versions for node, cli and adaptor with version', async (t) => { | ||
const logger = createMockLogger('', { level: 'info' }); | ||
await printVersions(logger, { adaptors: ['http@1234'] }); | ||
|
||
const last = logger._parse(logger._last); | ||
const message = last.message as string; | ||
|
||
// very crude testing but it's ok to test the intent here | ||
t.regex(message, /Versions:/); | ||
t.regex(message, /cli/); | ||
t.regex(message, /runtime/); | ||
t.regex(message, /compiler/); | ||
t.regex(message, /node/); | ||
t.regex(message, /http .+ 1234/); | ||
}); | ||
|
||
test('print versions for node, cli, runtime, compiler and long-form adaptor', async (t) => { | ||
test('print versions for node, cli and long-form adaptor', async (t) => { | ||
const logger = createMockLogger('', { level: 'info' }); | ||
await printVersions(logger, { adaptors: ['@openfn/language-http'] }); | ||
|
||
|
@@ -61,7 +74,7 @@ test('print versions for node, cli, runtime, compiler and long-form adaptor', as | |
t.regex(message, /@openfn\/language-http .+ latest/); | ||
}); | ||
|
||
test('print versions for node, cli, runtime, compiler and long-form adaptor with version', async (t) => { | ||
test('print versions for node, cli and long-form adaptor with version', async (t) => { | ||
const logger = createMockLogger('', { level: 'info' }); | ||
await printVersions(logger, { adaptors: ['@openfn/language-http@1234'] }); | ||
|
||
|
@@ -71,6 +84,24 @@ test('print versions for node, cli, runtime, compiler and long-form adaptor with | |
t.regex(message, /@openfn\/language-http .+ 1234/); | ||
}); | ||
|
||
test('print version of adaptor with monorepo', async (t) => { | ||
mock({ | ||
'/repo/http/package.json': '{ "version": "1.0.0" }', | ||
[root]: mock.load(root, {}), | ||
}); | ||
|
||
const logger = createMockLogger('', { level: 'info' }); | ||
await printVersions(logger, { | ||
adaptors: ['@openfn/[email protected]'], | ||
monorepoPath: '.', | ||
}); | ||
|
||
const last = logger._parse(logger._last); | ||
const message = last.message as string; | ||
|
||
t.regex(message, /@openfn\/language-http(.+)monorepo/); | ||
}); | ||
|
||
test('print version of adaptor with path', async (t) => { | ||
mock({ | ||
'/repo/http/package.json': '{ "version": "1.0.0" }', | ||
|
@@ -88,6 +119,24 @@ test('print version of adaptor with path', async (t) => { | |
t.regex(message, /@openfn\/language-http(.+)1\.0\.0/); | ||
}); | ||
|
||
test('print version of adaptor with path even if monorepo is set', async (t) => { | ||
mock({ | ||
'/repo/http/package.json': '{ "version": "1.0.0" }', | ||
[root]: mock.load(root, {}), | ||
}); | ||
|
||
const logger = createMockLogger('', { level: 'info' }); | ||
await printVersions(logger, { | ||
adaptors: ['@openfn/language-http=/repo/http'], | ||
monorepoPath: '.', | ||
}); | ||
|
||
const last = logger._parse(logger._last); | ||
const message = last.message as string; | ||
|
||
t.regex(message, /@openfn\/language-http(.+)1\.0\.0/); | ||
}); | ||
|
||
test('print version of adaptor with path and @', async (t) => { | ||
mock({ | ||
'/repo/node_modules/@openfn/http/package.json': '{ "version": "1.0.0" }', | ||
|
@@ -115,7 +164,5 @@ test('json output', async (t) => { | |
const [{ versions }] = last.message; | ||
t.truthy(versions['node.js']); | ||
t.truthy(versions['cli']); | ||
t.truthy(versions['runtime']); | ||
t.truthy(versions['compiler']); | ||
t.truthy(versions['http']); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.