Initial checklist
Affected packages and versions
11.0.4
Link to runnable example
No response
Steps to reproduce
The CallableInstance class is using Object.defineProperty without checking descriptor.configurable. When we used unified in a android mobile environment, we saw some differences in how the Processor class was being constructed that caused an error.
The difference we saw was if the javascript is transformed to target ES5 (ECMAScript 5.0), the Processor's copy method had a different number of property names defined than in ES6. Some of these properties are configurable: false, so calling Object.defineProperty on them throws a "Cannot redefine property: arguments" error.
In ES5:

In ES6 (Chrome):

Notice in ES6, the number of property names is simply ['length', 'name'], but in ES5 it includes additional property names that are not configurable. I believe simply checking configurable would solve this issue.
Expected behavior
Should be able to call unified() without error.
Actual behavior
Calling unified() throws an error "Cannot redefine property: arguments" during the super('copy') within the Processor's constructor.
Affected runtime and version
node@20.11.1
Affected package manager and version
npm@11.0.4
Affected OS and version
No response
Build and bundle tools
No response
Initial checklist
Affected packages and versions
11.0.4
Link to runnable example
No response
Steps to reproduce
The CallableInstance class is using
Object.definePropertywithout checkingdescriptor.configurable. When we used unified in a android mobile environment, we saw some differences in how the Processor class was being constructed that caused an error.The difference we saw was if the javascript is transformed to target ES5 (ECMAScript 5.0), the Processor's
copymethod had a different number of property names defined than in ES6. Some of these properties areconfigurable: false, so callingObject.definePropertyon them throws a "Cannot redefine property: arguments" error.In ES5:

In ES6 (Chrome):

Notice in ES6, the number of property names is simply
['length', 'name'], but in ES5 it includes additional property names that are not configurable. I believe simply checkingconfigurablewould solve this issue.Expected behavior
Should be able to call
unified()without error.Actual behavior
Calling
unified()throws an error "Cannot redefine property: arguments" during thesuper('copy')within the Processor's constructor.Affected runtime and version
node@20.11.1
Affected package manager and version
npm@11.0.4
Affected OS and version
No response
Build and bundle tools
No response