Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,4 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
EXTERNAL_ADAPTER_GENERATOR_NO_INTERACTIVE: 'true'
EXTERNAL_ADAPTER_GENERATOR_STANDALONE: 'true'
EXTERNAL_ADAPTER_GENERATOR_USE_LOCAL_FRAMEWORK_VERSION: 'true'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When would this be false?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you generate a real new adapter in external-adapters-js.
Then it uses the published framework version.

8 changes: 5 additions & 3 deletions scripts/generator-adapter/generators/app/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export default class extends Generator.default {
// with the same content in the same directory and extend from it. Also, new packages and config files (jest, babel) will be added
// to be able to run the tests
standalone = process.env.EXTERNAL_ADAPTER_GENERATOR_STANDALONE === 'true'
useLocalFrameworkVersion = process.env.EXTERNAL_ADAPTER_GENERATOR_USE_LOCAL_FRAMEWORK_VERSION === 'true'

constructor(args, opts) {
super(args, opts, { customInstallTask: true })
Expand Down Expand Up @@ -96,11 +97,12 @@ export default class extends Generator.default {
const endpointNames = Object.values(endpoints).map(e => e.normalizedEndpointName).join(', ')

const includeComments = await this._promptConfirmation(adapterName, endpointNames)
const frameworkVersion = this.useLocalFrameworkVersion
? 'file:../../dist/src'
: (await require('../../../package.json')).version

this.props = {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
frameworkVersion: (await require('../../../package.json')).version,
frameworkVersion,
adapterName,
endpoints,
endpointNames,
Expand Down
1 change: 1 addition & 0 deletions src/util/testing-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,7 @@ export const allowedUndefinedStubProps = [
'toJSON',
'asymmetricMatch',
'then',
'FEED_ID_JSON',
]

const isStubPropAllowedUndefined = (prop: string | symbol) => {
Expand Down
Loading