Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/module-imports #8

Merged
merged 4 commits into from
Dec 5, 2024
Merged

Fix/module-imports #8

merged 4 commits into from
Dec 5, 2024

Conversation

jhoward1994
Copy link
Contributor

What does it do?

Some thing I spotted during review of #6

  • pr review typos
  • always prepend api to baseurl
  • make package a module

I ran up against this problem when trying to use the SDK in a basic example
#6 (review)

Related issue(s)/PR(s)

#6

@jhoward1994 jhoward1994 self-assigned this Dec 4, 2024
src/http/client.ts Outdated Show resolved Hide resolved
@jhoward1994
Copy link
Contributor Author

✖ pnpm run prettier:write:
[error] Invalid configuration for file "/Users/jamie/scr/strapi/code/sdk-js/.commitlintrc.ts":
[error] module is not defined in ES module scope
[error] This file is being treated as an ES module because it has a '.js' file extension and '/Users/jamie/scr/strapi/code/sdk-js/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.

I can't run commit lint atm. I'm a bit confused how to fix this since we changed type = module in package JSON. We don’t want to lose the TS notation by changing it to cjs

@Convly Convly merged commit 6b45bc9 into feat/sdk-initialization Dec 5, 2024
8 checks passed
@Convly Convly deleted the fix/module-imports branch December 5, 2024 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants