Skip to content

Commit

Permalink
Make uniqueKey undefined by default (#8601)
Browse files Browse the repository at this point in the history
  • Loading branch information
mischnic committed Nov 3, 2022
1 parent eeb10f2 commit 625935b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/core/src/assetUtils.js
Expand Up @@ -126,7 +126,7 @@ export function createAsset(
]),
),
sideEffects: options.sideEffects ?? true,
uniqueKey: options.uniqueKey ?? '',
uniqueKey: options.uniqueKey,
plugin: options.plugin,
configPath: options.configPath,
configKeyPath: options.configKeyPath,
Expand Down
@@ -0,0 +1 @@
import "";
14 changes: 14 additions & 0 deletions packages/core/integration-tests/test/resolver.js
@@ -1,3 +1,4 @@
// @flow strict-local
import assert from 'assert';
import path from 'path';
import {bundle, run, ncp, overlayFS, outputFS} from '@parcel/test-utils';
Expand Down Expand Up @@ -398,4 +399,17 @@ describe('resolver', function () {
inputFS: overlayFS,
});
});

it('should support empty dependency specifiers', async function () {
// $FlowFixMe[prop-missing];
await assert.rejects(
() =>
bundle(
path.join(__dirname, '/integration/resolve-empty-specifier/index.js'),
),
{
message: `Failed to resolve '' from './integration/resolve-empty-specifier/index.js'`,
},
);
});
});

0 comments on commit 625935b

Please sign in to comment.