Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ We target by default Node@14 but you can add a browser output by adding a `brows
}
```

The browserlist we are currently using is available in the [rollup.config.js](./rollup.config.js)
The browserlist we are currently using is available in the [rollup.config.mjs](./rollup.config.mjs)

> :warning: Bear in mind that we do not currently support different entrypoint per target as we don't have the use case

Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"workspaces": [
"packages/*"
],
"type": "module",
"devDependencies": {
"@babel/core": "^7.12.10",
"@babel/plugin-transform-runtime": "^7.12.10",
Expand All @@ -24,15 +25,15 @@
"lerna": "4.0.0",
"lint-staged": "^10.5.2",
"prettier": "^2.2.1",
"read-pkg": "^5.2.0",
"read-pkg": "^6.0.0",
"rollup": "^2.36.1",
"rollup-plugin-analyzer": "^4.0.0",
"rollup-plugin-preserve-shebangs": "^0.2.0"
},
"scripts": {
"lint": "eslint --cache .",
"lint:fix": "yarn run lint --fix",
"build": "lerna exec --ignore @scaleway/eslint-* --ignore @scaleway/countries -- rollup -c ../../rollup.config.js",
"build": "lerna exec --ignore @scaleway/eslint-* --ignore @scaleway/countries -- rollup -c ../../rollup.config.mjs",
"build:profile": "cross-env PROFILE=true yarn run build",
"commit": "npx git-cz -a",
"test": "jest",
Expand Down
10 changes: 5 additions & 5 deletions rollup.config.js → rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import babel from '@rollup/plugin-babel'
import { babel } from '@rollup/plugin-babel'
import commonjs from '@rollup/plugin-commonjs'
import resolve from '@rollup/plugin-node-resolve'
import { nodeResolve } from '@rollup/plugin-node-resolve'
import builtins from 'builtin-modules'
import readPkg from 'read-pkg'
import { readPackageAsync } from 'read-pkg'
import analyze from 'rollup-plugin-analyzer'
import { preserveShebangs } from 'rollup-plugin-preserve-shebangs';

Expand Down Expand Up @@ -35,7 +35,7 @@ const getConfig = (pkg, isBrowser = false) => {
presets: [['@babel/env', { modules: false, targets }]],
plugins: ['@babel/plugin-transform-runtime'],
}),
resolve({
nodeResolve({
browser: isBrowser,
preferBuiltins: true,
}),
Expand All @@ -61,7 +61,7 @@ const getConfig = (pkg, isBrowser = false) => {
}

export default async () => {
const pkg = await readPkg()
const pkg = await readPackageAsync()

const doesAlsoTargetBrowser = 'browser' in pkg

Expand Down
46 changes: 34 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4951,6 +4951,13 @@ hosted-git-info@^3.0.6:
dependencies:
lru-cache "^6.0.0"

hosted-git-info@^4.0.1:
version "4.0.2"
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-4.0.2.tgz#5e425507eede4fea846b7262f0838456c4209961"
integrity sha512-c9OGXbZ3guC/xOlCg1Ci/VgWlwsqDv1yMQL1CWqXDL0hDjXuNcq0zuR4xqPSuasI3kqFDhqSyTjREz5gzq0fXg==
dependencies:
lru-cache "^6.0.0"

html-encoding-sniffer@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz#42a6dc4fd33f00281176e8b23759ca4e4fa185f3"
Expand Down Expand Up @@ -6822,14 +6829,14 @@ normalize-package-data@^2.0.0, normalize-package-data@^2.3.0, normalize-package-
semver "2 || 3 || 4 || 5"
validate-npm-package-license "^3.0.1"

normalize-package-data@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-3.0.0.tgz#1f8a7c423b3d2e85eb36985eaf81de381d01301a"
integrity sha512-6lUjEI0d3v6kFrtgA/lOx4zHCWULXsFNIjHolnZCKCTLA6m/G625cdn3O7eNmT0iD3jfo6HZ9cdImGZwf21prw==
normalize-package-data@^3.0.0, normalize-package-data@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-3.0.2.tgz#cae5c410ae2434f9a6c1baa65d5bc3b9366c8699"
integrity sha512-6CdZocmfGaKnIHPVFhJJZ3GuR8SsLKvDANFp47Jmy51aKIr8akjAWTSxtpI+MBgBFdSMRyo4hMpDlT6dTffgZg==
dependencies:
hosted-git-info "^3.0.6"
resolve "^1.17.0"
semver "^7.3.2"
hosted-git-info "^4.0.1"
resolve "^1.20.0"
semver "^7.3.4"
validate-npm-package-license "^3.0.1"

normalize-path@^2.1.1:
Expand Down Expand Up @@ -7268,10 +7275,10 @@ parse-json@^4.0.0:
error-ex "^1.3.1"
json-parse-better-errors "^1.0.1"

parse-json@^5.0.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.1.0.tgz#f96088cdf24a8faa9aea9a009f2d9d942c999646"
integrity sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ==
parse-json@^5.0.0, parse-json@^5.2.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd"
integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==
dependencies:
"@babel/code-frame" "^7.0.0"
error-ex "^1.3.1"
Expand Down Expand Up @@ -7763,6 +7770,16 @@ read-pkg@^5.2.0:
parse-json "^5.0.0"
type-fest "^0.6.0"

read-pkg@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-6.0.0.tgz#a67a7d6a1c2b0c3cd6aa2ea521f40c458a4a504c"
integrity sha512-X1Fu3dPuk/8ZLsMhEj5f4wFAF0DWoK7qhGJvgaijocXxBmSToKfbFtqbxMO7bVjNA1dmE5huAzjXj/ey86iw9Q==
dependencies:
"@types/normalize-package-data" "^2.4.0"
normalize-package-data "^3.0.2"
parse-json "^5.2.0"
type-fest "^1.0.1"

read@1, read@~1.0.1:
version "1.0.7"
resolved "https://registry.yarnpkg.com/read/-/read-1.0.7.tgz#b3da19bd052431a97671d44a42634adf710b40c4"
Expand Down Expand Up @@ -8002,7 +8019,7 @@ resolve-url@^0.2.1:
resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=

resolve@^1.1.6, resolve@^1.10.0, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.17.0, resolve@^1.18.1, resolve@^1.19.0:
resolve@^1.1.6, resolve@^1.10.0, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.17.0, resolve@^1.18.1, resolve@^1.19.0, resolve@^1.20.0:
version "1.20.0"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975"
integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==
Expand Down Expand Up @@ -9014,6 +9031,11 @@ type-fest@^0.8.1:
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d"
integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==

type-fest@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-1.0.1.tgz#2494455e65c59170ec98bdda05b7d7184f5b74ad"
integrity sha512-+UTPE7JT3O+sUpRroRgQAbbSfIRBwOHh+o/oruB1JJE6g6uBm3Y0D82fO3xu8VHfxJLQjeRp0PEY6mRmh/lElA==

typedarray-to-buffer@^3.1.5:
version "3.1.5"
resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080"
Expand Down