Skip to content

Commit

Permalink
Issue 79 - incorrect map relative reference (#82)
Browse files Browse the repository at this point in the history
* update dependencies to latest

* improve rollup build setup

* remove `dist-prev` used for debugging sourcemaps

* revert debugging changes

* update CHANGELOG
  • Loading branch information
planttheidea authored Aug 13, 2022
1 parent 0bd8a1a commit 9797612
Show file tree
Hide file tree
Showing 4 changed files with 2,233 additions and 2,206 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# micro-memoize CHANGELOG

## 4.0.11

- Fix [#79](https://github.com/planttheidea/micro-memoize/issues/79) - Sourcemaps referencing incorrect hierarchy

## 4.0.10

- Fix [#76](https://github.com/planttheidea/micro-memoize/issues/76) - `noUncheckedIndexedAccess` support on TS 4.1+
Expand Down
46 changes: 23 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,50 +14,50 @@
},
"description": "A tiny, crazy fast memoization library for the 95% use-case",
"devDependencies": {
"@rollup/plugin-typescript": "^8.3.2",
"@rollup/plugin-typescript": "^8.3.4",
"@types/bluebird": "^3.5.36",
"@types/jest": "^27.4.1",
"@types/react": "^18.0.6",
"@typescript-eslint/eslint-plugin": "^5.20.0",
"@typescript-eslint/parser": "^5.20.0",
"@types/jest": "^28.1.6",
"@types/react": "^18.0.17",
"@typescript-eslint/eslint-plugin": "^5.33.0",
"@typescript-eslint/parser": "^5.33.0",
"benchee": "^1.1.0",
"benchmark": "^2.1.4",
"bluebird": "^3.7.2",
"cli-table2": "^0.2.0",
"eslint": "^8.14.0",
"eslint": "^8.21.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-react": "^7.29.4",
"eslint-webpack-plugin": "^3.1.1",
"fast-equals": "^3.0.1",
"eslint-plugin-jsx-a11y": "^6.6.1",
"eslint-plugin-react": "^7.30.1",
"eslint-webpack-plugin": "^3.2.0",
"fast-equals": "^4.0.1",
"fast-memoize": "^2.5.2",
"html-webpack-plugin": "^5.5.0",
"in-publish": "^2.0.1",
"jest": "^27.5.1",
"jest": "^28.1.3",
"lodash": "^4.17.21",
"lru-memoize": "^1.1.0",
"mem": "^9.0.2",
"memoizee": "^0.4.15",
"memoizerific": "^1.11.3",
"mini-bench": "^1.0.0",
"ora": "^6.1.0",
"ora": "^6.1.2",
"performance-now": "^2.1.0",
"ramda": "^0.28.0",
"react": "^18.0.0",
"release-it": "^14.14.2",
"rollup": "^2.70.2",
"react": "^18.2.0",
"release-it": "^15.3.0",
"rollup": "^2.77.3",
"rollup-plugin-terser": "^7.0.2",
"rsvp": "^4.8.5",
"simple-statistics": "^7.7.5",
"ts-jest": "^27.1.4",
"ts-loader": "^9.2.8",
"simple-statistics": "^7.7.6",
"ts-jest": "^28.0.7",
"ts-loader": "^9.3.1",
"tslib": "^2.4.0",
"typescript": "^4.6.3",
"underscore": "^1.13.3",
"webpack": "^5.72.0",
"webpack-cli": "^4.9.2",
"webpack-dev-server": "^4.8.1"
"typescript": "^4.7.4",
"underscore": "^1.13.4",
"webpack": "^5.74.0",
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.10.0"
},
"homepage": "https://github.com/planttheidea/micro-memoize#readme",
"keywords": [
Expand Down
36 changes: 23 additions & 13 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import typescript from '@rollup/plugin-typescript';
import { terser } from 'rollup-plugin-terser';
import tsc from 'typescript';
import localTypescript from 'typescript';

import pkg from './package.json';

Expand All @@ -12,29 +12,39 @@ const UMD_CONFIG = {
format: 'umd',
name: pkg.name,
sourcemap: true,
sourcemapPathTransform(sourcePath) {
const [, sourceFile] = sourcePath.split('/src/');

return `../src/${sourceFile}`;
},
},
plugins: [typescript({ typescript: tsc })],
plugins: [typescript({ typescript: localTypescript })],
};

const FORMATTED_CONFIG = Object.assign({}, UMD_CONFIG, {
const FORMATTED_CONFIG = {
...UMD_CONFIG,
output: [
Object.assign({}, UMD_CONFIG.output, {
{
...UMD_CONFIG.output,
file: pkg.main,
format: 'cjs',
}),
Object.assign({}, UMD_CONFIG.output, {
},
{
...UMD_CONFIG.output,
file: pkg.module,
format: 'es',
}),
},
],
});
};

const MINIFIED_CONFIG = Object.assign({}, UMD_CONFIG, {
output: Object.assign({}, UMD_CONFIG.output, {
const MINIFIED_CONFIG = {
...UMD_CONFIG,
output: {
...UMD_CONFIG.output,
file: pkg.browser.replace('.js', '.min.js'),
sourcemap: false,
}),
plugins: UMD_CONFIG.plugins.concat([terser()]),
});
},
plugins: [...UMD_CONFIG.plugins, terser()],
};

export default [UMD_CONFIG, FORMATTED_CONFIG, MINIFIED_CONFIG];
Loading

0 comments on commit 9797612

Please sign in to comment.