| Summary: | [tern18] Tern doesn't recognize global properties when node plugin is running | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Curtis Windatt <curtis.windatt.public> |
| Component: | JS Tools | Assignee: | Curtis Windatt <curtis.windatt.public> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 12.0 | ||
| Target Milestone: | 12.0 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
| Bug Depends on: | 493276 | ||
| Bug Blocks: | |||
|
Description
Curtis Windatt
This is caused by the modules plugin adding a wrapping scope to every single file. Globals no longer show up in the top level scope. Workaround is to not run node plugin when not using node for dependencies. Fix is only modify the scope when we are using node in that specific file. Same problem will occur for es_modules plugin and commonJS. http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=83fe8bfc3b98d99d1c2fef25c88f06e6dee46652 This fixes the problem by explicitly checking that the current file is using a node environment. However, this check will cause problems for es_modules support which also uses modules.js. http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=09838adac94db342e7c05c2222a93183917e9b4b This substantially expands our cross file tests to check node, HTML global and es import dependencies. The es import tests are skipped because the current fix in modules.js only checks for node usage. http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=f80018ef1c5b8d2edb93af1279bfbee02db91d13 This allows es_modules plugin to run whenever there is an import declaration. I can't re-enable the es_modules tests because we can't set the Tern server to sourceType: module mode in the tests yet. See Bug 493276 Tests were added as part of Bug 493611. Marking this as FIXED. |