Skip to content
This repository has been archived by the owner on Oct 2, 2022. It is now read-only.

Doesn't work with Cosmiconfig sync API #134

Open
matthew-dean opened this issue Jan 22, 2021 · 2 comments
Open

Doesn't work with Cosmiconfig sync API #134

matthew-dean opened this issue Jan 22, 2021 · 2 comments

Comments

@matthew-dean
Copy link

matthew-dean commented Jan 22, 2021

Description

When using cosmiconfigSync, the result from search returns a promise on the config property.

What went wrong?

A promise was returned instead of the result.

What did you expect should have happened?

If I remove this loader, cosmiconfigSync / explorerSync works as expected. The config is an object, not a promise.

What was the config you used?

// {moduleName}.config.js

export default {
  options: {
    global: true
  }
}

What stacktrace or error messages did you see?

N/A

Similar or dependent issues:

  • none found

Additional Data

Version of cosmiconfig-typescript-loader you're using:
3.0.2
Node Version:
10.22.0
Operating System:
macOS 10.15.7

achmadk added a commit to achmadk/cosmiconfig-typescript-loader that referenced this issue Feb 22, 2021
include `cosmiconfig` APIs to perform testing

fix EndemolShineGroup#134
achmadk added a commit to achmadk/cosmiconfig-typescript-loader that referenced this issue Feb 22, 2021
add 1 optional parameters which will be passed into `ts-node` register options. successfully detect error when config file has typescript errors.

[BREAKING CHANGE]: you have to use loader() instead of loader. fix EndemolShineGroup#134
achmadk added a commit to achmadk/cosmiconfig-typescript-loader that referenced this issue Feb 22, 2021
update `cosmiconfig`, typescript definitions of `node`, `typedoc`, and `typescript` into latest version

fix EndemolShineGroup#134
@alvis
Copy link

alvis commented Oct 12, 2021

@achmadk I saw you tried to fix it. Did you manage to fix it?

@YonatanKra
Copy link

This still doesn't seem to work.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants