Skip to content

Commit

Permalink
Merge pull request #40 from trygve-lie/esm-only-rollup-3
Browse files Browse the repository at this point in the history
feat: ESM only and support for Rollup 3
  • Loading branch information
trygve-lie authored Oct 29, 2022
2 parents 12f53e5 + a36f338 commit 07e6c22
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 512 deletions.
27 changes: 0 additions & 27 deletions .github/workflows/compat.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 14.x
node-version: 16.x
- name: npm install
run: |
npm install
Expand All @@ -34,7 +34,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 14.x
node-version: 16.x
- name: npm install
run: |
npm install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
node-version: [14.x, 15.x]
node-version: [14.x, 16.x, 18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
Expand Down
1 change: 0 additions & 1 deletion dist/package.json

This file was deleted.

2 changes: 1 addition & 1 deletion src/lib/plugin.js → lib/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const validate = (map, options) => Object.keys(map.imports).map((key) => {
return { key, value };
});

const fileReader = (pathname = '', options) => new Promise((resolve, reject) => {
const fileReader = (pathname = '', options = {}) => new Promise((resolve, reject) => {
const filepath = path.normalize(pathname);
fs.promises.readFile(filepath).then((file) => {
try {
Expand Down
39 changes: 15 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,18 @@
"version": "2.2.0",
"description": "Rollup plugin to apply import map mappings to a build",
"type": "module",
"main": "./dist/lib/plugin.js",
"exports": {
"import": "./src/lib/plugin.js",
"require": "./dist/lib/plugin.js"
},
"main": "./lib/plugin.js",
"files": [
"src/lib",
"dist/lib"
"lib",
"LICENSE",
"README.md",
"package.json"
],
"scripts": {
"test": "tap --no-esm src/test/*.js --no-coverage",
"test:compat": "tap --no-esm dist/test/*.js --no-coverage",
"test:snapshot": "TAP_SNAPSHOT=1 npm run -s build && tap --no-esm src/test/*.js dist/test/*.js --no-coverage",
"lint": "eslint . --ext=js",
"lint:fix": "eslint . --fix --ext=js",
"prepare": "npm run -s build",
"build": "rollup -c ./rollup.config.js"
"test": "tap",
"test:snapshot": "TAP_SNAPSHOT=1 tap",
"lint": "eslint .",
"lint:fix": "eslint . --fix"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -55,16 +50,12 @@
"homepage": "https://github.com/trygve-lie/rollup-plugin-import-map#readme",
"devDependencies": {
"@semantic-release/changelog": "6.0.1",
"@semantic-release/commit-analyzer": "9.0.2",
"@semantic-release/git": "10.0.1",
"@semantic-release/github": "8.0.4",
"@semantic-release/npm": "9.0.1",
"@semantic-release/release-notes-generator": "10.0.3",
"eslint": "7.32.0",
"eslint-config-airbnb-base": "14.2.1",
"eslint-plugin-import": "2.24.0",
"rollup": "2.40.0",
"semantic-release": "19.0.3",
"tap": "14.11.0"
"eslint": "8.26.0",
"eslint-config-airbnb-base": "15.0.0",
"eslint-plugin-import": "2.26.0",
"rollup": "3.2.3",
"semantic-release": "19.0.5",
"tap": "16.03.0"
}
}
7 changes: 0 additions & 7 deletions rollup.config.js

This file was deleted.

4 changes: 0 additions & 4 deletions src/test/dirname.js

This file was deleted.

Loading

0 comments on commit 07e6c22

Please sign in to comment.