@web/config-loader
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -1,1 +0,1 @@ | ||
export * from './dist/index'; | ||
export * from './dist/index.js'; |
{ | ||
"name": "@web/config-loader", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"publishConfig": { | ||
@@ -41,5 +41,3 @@ "access": "public" | ||
], | ||
"dependencies": { | ||
"semver": "^7.3.4" | ||
}, | ||
"dependencies": {}, | ||
"types": "dist/index.d.ts", | ||
@@ -46,0 +44,0 @@ "exports": { |
@@ -1,7 +0,4 @@ | ||
const semver = require('semver'); | ||
const { pathToFileURL } = require('url'); | ||
const ConfigLoaderError = require('./ConfigLoaderError'); | ||
const supportsEsm = semver.satisfies(process.version, '>=12.17.0'); | ||
// These strings may be node-version dependent and need updating over time | ||
@@ -19,10 +16,2 @@ // They're just to display a helpful error message | ||
async function importConfig(path) { | ||
if (!supportsEsm) { | ||
throw new ConfigLoaderError( | ||
'You are trying to load a config as es module but your version of node does not support it. ' + | ||
'Update to node v12.17.0 or higher, or load the config as commonjs by using the .cjs extension ' + | ||
'or .js without type="module" set in your package.json', | ||
); | ||
} | ||
try { | ||
@@ -29,0 +18,0 @@ const config = await import(pathToFileURL(path).href); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
0
11086
200
- Removedsemver@^7.3.4
- Removedsemver@7.6.3(transitive)