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

Drop deprecated namedExports option #734

Merged
merged 1 commit into from
Mar 16, 2023

Conversation

bocharsky-bw
Copy link
Contributor

Q A
Bug fix? yes
New feature? no
Tickets Fix #733
License MIT

@weaverryan
Copy link
Member

Thanks Victor!

@weaverryan weaverryan merged commit 122e228 into symfony:2.x Mar 16, 2023
@bocharsky-bw bocharsky-bw deleted the namedExports branch March 16, 2023 15:45
weaverryan added a commit that referenced this pull request Mar 16, 2023
This PR was merged into the 2.x branch.

Discussion
----------

Fix TypeScript warnings

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Tickets       | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT

If you run `yarn build` there are quite a few TS warnings. This happened because we originally didn't use TypeScript, so when we switched, a lot of "types" were missing.

I'm not sure how to fix the last one remaining here:
```
src/Notify/assets/src/controller.ts → src/Notify/assets/dist/controller.js...
(!) Plugin typescript: `@rollup`/plugin-typescript TS2769: No overload matches this call.
  Overload 1 of 3, '(type: "message", listener: (this: EventSource, ev: MessageEvent<any>) => any, options?: boolean | EventListenerOptions | undefined): void', gave the following error.
    Argument of type '(content: string | undefined) => void' is not assignable to parameter of type '(this: EventSource, ev: MessageEvent<any>) => any'.
      Types of parameters 'content' and 'ev' are incompatible.
        Type 'MessageEvent<any>' is not assignable to type 'string'.
  Overload 2 of 3, '(type: string, listener: (this: EventSource, event: MessageEvent<any>) => any, options?: boolean | EventListenerOptions | undefined): void', gave the following error.
    Argument of type '(content: string | undefined) => void' is not assignable to parameter of type '(this: EventSource, event: MessageEvent<any>) => any'.
      Types of parameters 'content' and 'event' are incompatible.
        Type 'MessageEvent<any>' is not assignable to type 'string'.
  Overload 3 of 3, '(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions | undefined): void', gave the following error.
    Argument of type '(content: string | undefined) => void' is not assignable to parameter of type 'EventListenerOrEventListenerObject'.
      Type '(content: string | undefined) => void' is not assignable to type 'EventListener'.
        Types of parameters 'content' and 'evt' are incompatible.
          Type 'Event' is not assignable to type 'string'.
src/Notify/assets/src/controller.ts: (61:56)

61             eventSource.removeEventListener('message', this._notify);
                                                          ~~~~~~~~~~~~
created src/Notify/assets/dist/controller.js in 926ms
```

If anyone has ideas how to fix - please, share :)

Depreciations like "(!) Plugin commonjs: The namedExports option from "`@rollup`/plugin-commonjs" is deprecated. Named exports are now handled automatically." were fixed in #734

Commits
-------

5c585f2 [Notify] Fixing bug where disconnecting was not precisely disconnecting the correct thing
50ecc6f Fix TypeScript warnings
jameswebapp added a commit to jameswebapp/ux that referenced this pull request Aug 1, 2023
This PR was merged into the 2.x branch.

Discussion
----------

Fix TypeScript warnings

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Tickets       | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT

If you run `yarn build` there are quite a few TS warnings. This happened because we originally didn't use TypeScript, so when we switched, a lot of "types" were missing.

I'm not sure how to fix the last one remaining here:
```
src/Notify/assets/src/controller.ts → src/Notify/assets/dist/controller.js...
(!) Plugin typescript: `@rollup`/plugin-typescript TS2769: No overload matches this call.
  Overload 1 of 3, '(type: "message", listener: (this: EventSource, ev: MessageEvent<any>) => any, options?: boolean | EventListenerOptions | undefined): void', gave the following error.
    Argument of type '(content: string | undefined) => void' is not assignable to parameter of type '(this: EventSource, ev: MessageEvent<any>) => any'.
      Types of parameters 'content' and 'ev' are incompatible.
        Type 'MessageEvent<any>' is not assignable to type 'string'.
  Overload 2 of 3, '(type: string, listener: (this: EventSource, event: MessageEvent<any>) => any, options?: boolean | EventListenerOptions | undefined): void', gave the following error.
    Argument of type '(content: string | undefined) => void' is not assignable to parameter of type '(this: EventSource, event: MessageEvent<any>) => any'.
      Types of parameters 'content' and 'event' are incompatible.
        Type 'MessageEvent<any>' is not assignable to type 'string'.
  Overload 3 of 3, '(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions | undefined): void', gave the following error.
    Argument of type '(content: string | undefined) => void' is not assignable to parameter of type 'EventListenerOrEventListenerObject'.
      Type '(content: string | undefined) => void' is not assignable to type 'EventListener'.
        Types of parameters 'content' and 'evt' are incompatible.
          Type 'Event' is not assignable to type 'string'.
src/Notify/assets/src/controller.ts: (61:56)

61             eventSource.removeEventListener('message', this._notify);
                                                          ~~~~~~~~~~~~
created src/Notify/assets/dist/controller.js in 926ms
```

If anyone has ideas how to fix - please, share :)

Depreciations like "(!) Plugin commonjs: The namedExports option from "`@rollup`/plugin-commonjs" is deprecated. Named exports are now handled automatically." were fixed in symfony/ux#734

Commits
-------

5c585f22 [Notify] Fixing bug where disconnecting was not precisely disconnecting the correct thing
50ecc6f6 Fix TypeScript warnings
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.

The namedExports option from "@rollup/plugin-commonjs" is deprecated.
2 participants