Skip to content

Commit

Permalink
Fix test path not exported (#26)
Browse files Browse the repository at this point in the history
* test: fix error ERR_PACKAGE_PATH_NOT_EXPORTED

* style: correct imports order

* fix: update release-it version for correct exports

* feat: extend exports with package.json

* chore: test on node 18 lts too
  • Loading branch information
ath0mas committed Jan 4, 2023
1 parent 5c2e3b6 commit e418c73
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Expand Up @@ -13,6 +13,7 @@ jobs:
node:
- 14
- 16
- 18

runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} (Node v${{ matrix.node }})
Expand Down
9 changes: 6 additions & 3 deletions package.json
Expand Up @@ -3,7 +3,10 @@
"version": "4.0.0",
"description": "Version read/write plugin for release-it",
"type": "module",
"exports": "./index.js",
"exports": {
".": "./index.js",
"./package.json": "./package.json"
},
"scripts": {
"test": "bron test.js",
"release": "release-it"
Expand Down Expand Up @@ -42,11 +45,11 @@
"devDependencies": {
"bron": "^2.0.3",
"mock-fs": "^5.1.2",
"release-it": "^15.0.0-esm.4",
"release-it": "^15.2.0",
"sinon": "^13.0.2"
},
"peerDependencies": {
"release-it": "^15.0.0-esm.4"
"release-it": "^15.2.0"
},
"engines": {
"node": ">=14"
Expand Down
2 changes: 1 addition & 1 deletion test.js
Expand Up @@ -4,8 +4,8 @@ import { EOL } from 'os';

import assert from 'assert';
import mock from 'mock-fs';
import { factory, runTasks } from 'release-it/test/util/index.js';
import Bumper from './index.js';
import { factory, runTasks } from 'release-it/test/util';

mock({
'./bower.json': JSON.stringify({ version: '1.0.0' }) + EOL,
Expand Down

0 comments on commit e418c73

Please sign in to comment.