mirror of
https://github.com/lancedikson/bowser
synced 2026-09-23 12:34:58 +00:00
fix: keep every published file reachable, and test all four build artifacts (#631)
This commit is contained in:
@@ -93,6 +93,19 @@ check('require.resolve("bowser/package.json") works', function () {
|
||||
assert.ok(fs.existsSync(require.resolve('bowser/package.json')));
|
||||
});
|
||||
|
||||
// Before the exports map existed, *every* published file was reachable by
|
||||
// subpath. An exports map is a closed list, so anything published but not
|
||||
// enumerated silently becomes ERR_PACKAGE_PATH_NOT_EXPORTED. These four are
|
||||
// not code, but they did resolve on every previous version — license and
|
||||
// attribution tooling and `/// <reference types="bowser/index.d.ts" />`
|
||||
// consumers can all depend on them.
|
||||
['bowser/LICENSE', 'bowser/README.md', 'bowser/index.d.ts', 'bowser/index.d.mts']
|
||||
.forEach(function (id) {
|
||||
check('resolves "' + id + '"', function () {
|
||||
assert.ok(fs.existsSync(require.resolve(id)));
|
||||
});
|
||||
});
|
||||
|
||||
// --- The published manifest ------------------------------------------------
|
||||
|
||||
check('main/browser/module/types fields are unchanged', function () {
|
||||
|
||||
Reference in New Issue
Block a user