Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Converted to v2 addon format #447

Merged
merged 4 commits into from
Apr 8, 2024
Merged

Converted to v2 addon format #447

merged 4 commits into from
Apr 8, 2024

Conversation

ijlee2
Copy link
Collaborator

@ijlee2 ijlee2 commented Apr 8, 2024

What changed?

  • Introduced workspaces (ember-render-helpers and test-app)
  • Converted ember-render-helpers to v2 addon
  • Updated CI

Comment on lines +79 to +80
"@types/ember__component": "^4.0.22",
"@types/ember__debug": "^4.0.8",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

To be safe, I replaced ember-source with @types/ember__* so that the declaration files don't include the line /// <reference ... />. At the time of writing, we may encounter an issue in the consuming project when this line is present.

- /// <reference types="ember-source/types/stable/@ember/component/helper" />
import Helper from '@ember/component/helper';
import type { CallbackFunction, NamedParameters, PositionalParameters } from '../types.ts';
interface DidInsertHelperSignature {
    Args: {
        Named: NamedParameters;
        Positional: [CallbackFunction, ...PositionalParameters];
    };
    Return: void;
}
/**
 * This helper is activated only when it is rendered for the first time
 * (inserted in the DOM). It does not run during or after it is un-rendered
 * (removed from the DOM), or when its arguments are updated.
 */
export default class DidInsertHelperHelper extends Helper<DidInsertHelperSignature> {
    didRun: boolean;
    compute(positional: DidInsertHelperSignature['Args']['Positional'], named: DidInsertHelperSignature['Args']['Named']): void;
}
export {};
//# sourceMappingURL=did-insert-helper.d.ts.map

import type {
CallbackFunction,
NamedParameters,
PositionalParameters,
} from 'ember-render-helpers/types';
} from '../types.ts';
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In v2 addons, we have to use relative paths (self-reference is not allowed) and specify file extensions when a relative path is used.

@ijlee2 ijlee2 marked this pull request as ready for review April 8, 2024 13:56
@ijlee2 ijlee2 merged commit 272a9e9 into master Apr 8, 2024
12 checks passed
@delete-merged-branch delete-merged-branch bot deleted the convert-to-v2-addon branch April 8, 2024 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant