-
-
Notifications
You must be signed in to change notification settings - Fork 236
Description
@P0lip and @philsturgeon - I merged PR #153. All tests pass in Node.js, as well on Chrome, Firefox, and Safari. But they fail in IE and Edge due to the new dependencies that were added (@stoplight/json
and @stoplight/yaml
). Both of these dependencies use modern ES6+ syntax like rest/spread operators, object destructuring, etc. which is not supported in IE or Edge.
I see a few possible solutions to this problem:
Option 1: Remove unsupported syntax
Stoplight could update its libraries to only use syntax that is supported on IE and Edge. This requires code changes, but no changes are needed to any tooling or build steps.
Option 2: Transpile unsupported syntax to supported syntax
Stoplight could add a transpilation step (e.g. Babel, TypeScript) that converts the unsupported syntax to supported equivalents. This requires no code changes and allows Stoplight developers to continue using the latest syntax features, but requires changes to the tooling and/or build steps of these libraries.
Option 3: Drop dependencies
JSON Schema $Ref Parser could drop the Stoplight dependencies and revert to the previous built-in JSON/YAML parsing logic, which supports IE and Edge. Stoplight could then replace the built-in parsers with their own parsers in Stoplight projects.
@P0lip and @philsturgeon - what are your thoughts on the above options? Is there another option that I haven't considered?