diff --git a/README.md b/README.md index 100344d..ce38a8a 100644 --- a/README.md +++ b/README.md @@ -43,8 +43,8 @@ In Dev Tools, press F1 to load the Settings. Scroll down to the Console section You can directly install the browser extension for Chrome or Firefox. It automatically installs the formatters when you open the DevTools. -- Firefox: https://addons.mozilla.org/fr/firefox/addon/immutable-js-console-formatter/ -- Chrome (not working for now): https://chrome.google.com/webstore/detail/immutablejs-object-format/hgldghadipiblonfkkicmgcbbijnpeog +- Firefox: https://addons.mozilla.org/fr/firefox/addon/immutable-js-devtool-extension/ +- Chrome: https://chromewebstore.google.com/detail/immutablejs-object-format/lfdmhpmheemfkgjpifhenbkgcaaopckp ### Install in project @@ -58,7 +58,7 @@ And enable with: ```js import * as Immutable from 'immutable'; -import installDevTools = '@jdeniau/immutable-devtools'; +import installDevTools from '@jdeniau/immutable-devtools'; installDevTools(Immutable); ``` diff --git a/package.json b/package.json index 0efc35f..f0c030f 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@immutable/devtools", "description": "Immutable.js DevTools", "type": "module", - "version": "2.1.2", + "version": "2.1.5", "scripts": { "dev": "yarn workspace @immutable/devtools-extension run dev", "build": "yarn workspaces foreach --all -pt run build", diff --git a/packages/devtools/demo/demo.js b/packages/devtools/demo/demo.js index 98e9ef7..7facf9e 100644 --- a/packages/devtools/demo/demo.js +++ b/packages/devtools/demo/demo.js @@ -1,5 +1,5 @@ import * as Immutable from 'immutable'; -import installDevTools from '../dist/index.js'; +import installDevTools from '../dist/index.mjs'; var MyRecord = Immutable.Record( { diff --git a/packages/devtools/package.json b/packages/devtools/package.json index 5960c62..1728f29 100644 --- a/packages/devtools/package.json +++ b/packages/devtools/package.json @@ -1,24 +1,28 @@ { "name": "@jdeniau/immutable-devtools", "type": "module", - "version": "2.1.2", + "version": "2.1.5", "description": "Chrome Dev Tools formatter for the Immutable JS library", "exports": { ".": { - "import": "./dist/index.js", + "import": "./dist/index.mjs", + "require": "./dist/index.cjs", "types": "./dist/index.d.ts" } }, + "main": "dist/index.cjs", + "types": "dist/index.d.ts", "files": [ "dist" ], "scripts": { + "clean": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true });\"", "build:types": "tsc", "build:module": "rollup -c", - "build": "yarn run build:types && yarn run build:module", + "build": "yarn clean && yarn run build:types && yarn run build:module", "lint:types": "tsc --noEmit", "lint": "yarn run lint:types", - "prepublishOnly": "npm run-script build", + "prepublishOnly": "yarn build", "test": "jest" }, "keywords": [ diff --git a/packages/devtools/rollup.config.ts b/packages/devtools/rollup.config.js similarity index 83% rename from packages/devtools/rollup.config.ts rename to packages/devtools/rollup.config.js index b6285ec..5a2f3a1 100644 --- a/packages/devtools/rollup.config.ts +++ b/packages/devtools/rollup.config.js @@ -1,5 +1,4 @@ import fs from 'node:fs'; -import type { RollupOptions } from 'rollup'; import { babel } from '@rollup/plugin-babel'; import nodeResolve from '@rollup/plugin-node-resolve'; @@ -26,13 +25,20 @@ function injectDemoSource() { }; } -const config: Array = [ +/** @type {import('rollup').RollupOptions[]} */ +const config = [ { input: 'src/index.ts', - output: { - dir: 'dist', - format: 'es', - }, + output: [ + { + file: 'dist/index.mjs', + format: 'es', + }, + { + file: 'dist/index.cjs', + format: 'cjs', + }, + ], plugins: [ babel({ babelHelpers: 'bundled', diff --git a/packages/devtools/test.js b/packages/devtools/test.js index 687897d..1ee12f6 100644 --- a/packages/devtools/test.js +++ b/packages/devtools/test.js @@ -3,7 +3,7 @@ import Immutable4 from 'immutable'; import Immutable3 from 'immutable3'; -import installDevTools from './dist/index.js'; +import installDevTools from './dist/index.mjs'; installDevTools(Immutable4); console.log('Testing with Immutable 4'); diff --git a/packages/extension/babel.config.json b/packages/extension/babel.config.json index 1320b9a..9375ee5 100644 --- a/packages/extension/babel.config.json +++ b/packages/extension/babel.config.json @@ -1,3 +1,3 @@ { - "presets": ["@babel/preset-env"] + "presets": [["@babel/preset-env", { "targets": "defaults" }]] } diff --git a/packages/extension/extension/icon-128.png b/packages/extension/extension/icon-128.png index 38cc5fc..073bea1 100644 Binary files a/packages/extension/extension/icon-128.png and b/packages/extension/extension/icon-128.png differ diff --git a/packages/extension/extension/manifest.json b/packages/extension/extension/manifest.json index 3764aec..91084d8 100644 --- a/packages/extension/extension/manifest.json +++ b/packages/extension/extension/manifest.json @@ -2,7 +2,7 @@ "name": "Immutable.js devtools extension", "short_name": "Immutable.js devtools", "description": "Makes Immutable JS objects more readable when they are logged to the console.", - "version": "2.1.2", + "version": "2.1.5", "manifest_version": 3, "minimum_chrome_version": "88.0", "content_scripts": [ @@ -12,6 +12,9 @@ "https://*/*", "file://*/*" ], + "exclude_matches": [ + "https://app.clickup.com/*" + ], "js": [ "content-script.js" ], diff --git a/packages/extension/img/icon-128.png b/packages/extension/img/icon-128.png index 38cc5fc..073bea1 100644 Binary files a/packages/extension/img/icon-128.png and b/packages/extension/img/icon-128.png differ diff --git a/packages/extension/img/icon-large.png b/packages/extension/img/icon-large.png deleted file mode 100644 index 5e4e843..0000000 Binary files a/packages/extension/img/icon-large.png and /dev/null differ diff --git a/packages/extension/package.json b/packages/extension/package.json index 45c81f1..6dd4592 100644 --- a/packages/extension/package.json +++ b/packages/extension/package.json @@ -1,7 +1,7 @@ { "name": "@immutable/devtools-extension", "type": "module", - "version": "2.1.2", + "version": "2.1.5", "description": "", "exports": "./index.js", "scripts": {