Skip to content

not all methods listed in the API are exported from the index file, mainly "file system" ones #74

@march213

Description

@march213

Problem

👋🏻 Hello!

Noticed that some imports listed in the File System section are not exported.

Package version: "flow-cadut": "0.1.16-alpha.4",

Steps to Reproduce

const { sansExtension } = require('flow-cadut');
const fileName = sansExtension('log-message-and-return.cdc');
console.log({ fileName });

or

const { writeFile } = require('flow-cadut');

const script = `
  pub fun main(){
    log("Hello, Cadence")
  }
`;

writeFile('./cadence/scripts/log.cdc', script);

Error:

const fileName = sansExtension('log-message-and-return.cdc');
                 ^
TypeError: sansExtension is not a function

or

writeFile('./cadence/scripts/log.cdc', script);
^

TypeError: writeFile is not a function

Acceptance Criteria

All methods that are listed in the API docs are exported.

Maybe I'm using the wrong version, not sure. They look very promising and I'm eager to use them instead of custom scripts.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions