@scaleway/sdk 0.0.2-alpha.0 → 0.1.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +3 -3
  2. package/dist/index.cjs +29 -7078
  3. package/package.json +7 -3
package/README.md CHANGED
@@ -6,15 +6,15 @@ The project is in an early alpha phase. Only a few APIs are available, the rest
6
6
 
7
7
  ## Usage
8
8
 
9
- This SDK is based on the [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) API and use `Request`, `Response` & `Headers` interfaces. Those interfaces are native in modern Browser & in Deno environments.
9
+ This SDK is based on the [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) API and use `Request`, `Response` & `Headers` interfaces. Those interfaces are native in modern browsers, node >=18 & deno environments.
10
10
 
11
- For `node` & `React Native` environments, a commonJS build is ready to use with the [node-fetch](https://www.npmjs.com/package/node-fetch) polyfill already embeded.
11
+ For `node` < 18 & `React Native` environments, the commonJS build requires [cross-fetch](https://www.npmjs.com/package/cross-fetch) package, it is listed in `dependencies` but not used in esm build.
12
12
 
13
13
  ## Troubleshooting
14
14
 
15
15
  In node environment, the commonJS module defined in `dist/index.cjs` entry file is used by default, thanks to the "main" `package.json` field.
16
16
 
17
- If you want to use the ES module from `dist/index.js` within node & `React Native` environments, we recommend you to use [cross-fetch](https://www.npmjs.com/package/cross-fetch) because this entry file does not embed any [node-fetch](https://www.npmjs.com/package/node-fetch) polyfill:
17
+ If you want to use the ES module from `dist/index.js` with node < 18 & `React Native` environments, we recommend you to explicitly import [cross-fetch](https://www.npmjs.com/package/cross-fetch) polyfill:
18
18
 
19
19
  ```ts
20
20
  import 'cross-fetch/polyfill'