OpenJSCAD.org icon indicating copy to clipboard operation
OpenJSCAD.org copied to clipboard

V3 : core package does not support ES6 JSCAD designs

Open z3dev opened this issue 3 years ago • 3 comments

Expected Behavior

New designs with use the ES6-based packages (V3+) are supported. This includes both single file designs as well as projects with several components.

Actual Behavior

Fails

Steps to Reproduce the Problem

  1. Convert simple design to use ES6 import / exports
  2. Use CLI to convert design to STL, etc.
  3. BIG FAILURE

Specifications

  • Version:
  • Platform:
  • Environment: (browser, local server, node.js etc)

z3dev avatar Nov 13 '22 02:11 z3dev

One option for cli to work would be to have a cmdline option to say if it is es6 script that needs to run, or "old" .

z3dev avatar Nov 13 '22 05:11 z3dev

I am piggybacking on this issue for now to raise awareness of the fact that we will have problems recognizing v2 and v3 scripts if we keep the same package name: @jscad/modeling.

if it is a single file script and not a node project that has package.json there is no way to know if this is a V2 or a V3 script.

hrgdavor avatar Jan 04 '23 16:01 hrgdavor

I was discussing the problem of recognizing V2 and V3 scripts with @platypii and we agreed that a good way to do this and move forward would be to assume scritps that use require are V2, and esm improt or typescript are V3.

hrgdavor avatar Aug 25 '23 14:08 hrgdavor