mirror of
https://github.com/tenrok/axios.git
synced 2026-05-15 11:59:42 +03:00
fix(package): export package internals with unsafe path prefix; (#5677)
This commit is contained in:
+11
-1
@@ -18,6 +18,15 @@
|
||||
"default": "./index.js"
|
||||
}
|
||||
},
|
||||
"./unsafe/*": "./lib/*",
|
||||
"./unsafe/core/settle.js": "./lib/core/settle.js",
|
||||
"./unsafe/core/buildFullPath.js": "./lib/core/buildFullPath.js",
|
||||
"./unsafe/helpers/isAbsoluteURL.js": "./lib/helpers/isAbsoluteURL.js",
|
||||
"./unsafe/helpers/buildURL.js": "./lib/helpers/buildURL.js",
|
||||
"./unsafe/helpers/combineURLs.js": "./lib/helpers/combineURLs.js",
|
||||
"./unsafe/adapters/http.js": "./lib/adapters/http.js",
|
||||
"./unsafe/adapters/xhr.js": "./lib/adapters/xhr.js",
|
||||
"./unsafe/utils.js": "./lib/utils.js",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"type": "module",
|
||||
@@ -29,6 +38,7 @@
|
||||
"test:mocha": "node bin/ssl_hotfix.js mocha test/unit/**/*.js --timeout 30000 --exit",
|
||||
"test:exports": "node bin/ssl_hotfix.js mocha test/module/test.js --timeout 30000 --exit",
|
||||
"test:karma": "node bin/ssl_hotfix.js cross-env LISTEN_ADDR=:: karma start karma.conf.cjs --single-run",
|
||||
"test:karma:firefox": "node bin/ssl_hotfix.js cross-env LISTEN_ADDR=:: Browsers=Firefox karma start karma.conf.cjs --single-run",
|
||||
"test:karma:server": "node bin/ssl_hotfix.js cross-env karma start karma.conf.cjs",
|
||||
"test:build:version": "node ./bin/check-build-version.js",
|
||||
"start": "node ./sandbox/server.js",
|
||||
@@ -203,4 +213,4 @@
|
||||
"@commitlint/config-conventional"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import assert from 'assert';
|
||||
import axios, {CanceledError, AxiosError, AxiosHeaders} from 'axios';
|
||||
import settle from 'axios/unsafe/core/settle.js';
|
||||
|
||||
assert.strictEqual(typeof axios, 'function');
|
||||
assert.strictEqual(typeof CanceledError, 'function');
|
||||
@@ -10,4 +11,6 @@ assert.strictEqual(axios.CanceledError, CanceledError);
|
||||
assert.strictEqual(axios.AxiosError, AxiosError);
|
||||
assert.strictEqual(axios.AxiosHeaders, AxiosHeaders);
|
||||
|
||||
assert.strictEqual(typeof settle, 'function');
|
||||
|
||||
console.log('ESM importing test passed');
|
||||
|
||||
Reference in New Issue
Block a user