Skip to content

Commit

Permalink
[Fix] publish subpackage as a real package, since npm < 7 breaks with…
Browse files Browse the repository at this point in the history
… published file deps
  • Loading branch information
ljharb committed Oct 9, 2020
1 parent 15d2d48 commit 6599568
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
},
"homepage": "https://github.com/inspect-js/has-package-exports#readme",
"dependencies": {
"@ljharb/patterns": "file:./packages/patterns"
"@ljharb/has-package-exports-patterns": "0.0.0"
},
"devDependencies": {
"@ljharb/eslint-config": "^17.1.0",
Expand Down
16 changes: 14 additions & 2 deletions packages/patterns/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
{
"name": "@ljharb/patterns",
"name": "@ljharb/has-package-exports-patterns",
"version": "0.0.0",
"private": "true",
"main": "./no.js",
"exports": {
".": "./no.js",
"./patterns/*": "./patterns/*ed.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/inspect-js/has-package-exports.git"
},
"author": "Jordan Harband <[email protected]>",
"license": "MIT",
"bugs": {
"url": "https://github.com/inspect-js/has-package-exports/issues"
},
"homepage": "https://github.com/inspect-js/has-package-exports#readme",
"publishConfig": {
"access": "public"
}
}
2 changes: 1 addition & 1 deletion pattern.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
var supported;
try {
// eslint-disable-next-line global-require
supported = require('@ljharb/patterns/patterns/pattern');
supported = require('@ljharb/has-package-exports-patterns/patterns/pattern');
} catch (e) {
supported = false;
}
Expand Down

0 comments on commit 6599568

Please sign in to comment.