Skip to content
This repository has been archived by the owner on May 14, 2018. It is now read-only.

Allow local variables named define to be called **AST Feedback Wanted** #42

Merged
merged 1 commit into from
Jun 11, 2015

Conversation

c0
Copy link
Contributor

@c0 c0 commented Feb 5, 2015

  • Calling a nested local variable named define no longer triggers the A module must not have more than one anonymous 'define' calls. as long as there are no arguments.

While using FlightJS, amd-optimize was throwing a false positive error when checking for anonymous define calls.

I do not know enough about how to detect this scenario with AST, so this my naive attempt. Is there a better way?

- Calling a nested local variable named `define` no longer triggers the `A
  module must not have more than one anonymous 'define' calls.` as long
  as there are no arguments.
c0 added a commit to rentpath/flight that referenced this pull request Feb 10, 2015
- Rename `define` to `definition` in `component.js`

`component.js`'s internal `define` function can be mixed up with
requirejs's use of `define` as seen in  [amd-optimize](scalableminds/amd-optimize#42)
c0 added a commit to rentpath/flight that referenced this pull request Feb 10, 2015
- Rename `define` to `defineComponent` in `component.js`

`component.js`'s internal `define` function can be mixed up with
AMD's use of `define` as seen in  [amd-optimize](scalableminds/amd-optimize#42)
@normanrz normanrz merged commit 9e53692 into scalableminds:master Jun 11, 2015
@normanrz
Copy link
Member

Hi, thanks for submitting this PR and sorry for the long wait. I think your implementation and detection of error is quite good :-)

@c0
Copy link
Contributor Author

c0 commented Jun 11, 2015

Thanks!

@c0 c0 deleted the c0/local_define branch June 11, 2015 13:57
@normanrz
Copy link
Member

:-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants