instantsearch.js 4.71.0 → 4.71.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/lib/version.js +1 -1
- package/dist/instantsearch.development.js +2 -2
- package/dist/instantsearch.development.js.map +1 -1
- package/dist/instantsearch.production.min.js +2 -2
- package/dist/instantsearch.production.min.js.map +1 -1
- package/es/lib/version.d.ts +1 -1
- package/es/lib/version.js +1 -1
- package/package.json +5 -5
- package/scripts/transforms/README.md +1 -1
- package/scripts/transforms/addWidget-to-addWidgets.js +7 -27
package/es/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "4.71.
|
|
1
|
+
declare const _default: "4.71.1";
|
|
2
2
|
export default _default;
|
package/es/lib/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '4.71.
|
|
1
|
+
export default '4.71.1';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "instantsearch.js",
|
|
3
|
-
"version": "4.71.
|
|
3
|
+
"version": "4.71.1",
|
|
4
4
|
"description": "InstantSearch.js is a JavaScript library for building performant and instant search experiences with Algolia.",
|
|
5
5
|
"homepage": "https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/js/",
|
|
6
6
|
"types": "es/index.d.ts",
|
|
@@ -56,9 +56,9 @@
|
|
|
56
56
|
"watch:es": "yarn --silent build:es:base --watch"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@instantsearch/mocks": "1.
|
|
60
|
-
"@instantsearch/tests": "1.
|
|
61
|
-
"@instantsearch/testutils": "1.
|
|
59
|
+
"@instantsearch/mocks": "1.47.0",
|
|
60
|
+
"@instantsearch/tests": "1.47.0",
|
|
61
|
+
"@instantsearch/testutils": "1.36.0",
|
|
62
62
|
"@storybook/html": "5.3.9",
|
|
63
63
|
"@types/scriptjs": "0.0.2",
|
|
64
64
|
"algoliasearch": "4.23.2",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"scriptjs": "2.5.9",
|
|
67
67
|
"webpack": "4.47.0"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "443c2f875bd5ddd5cc94285b49c1e8c05df5e0f6"
|
|
70
70
|
}
|
|
@@ -7,7 +7,7 @@ These codemods (code transformers) can be ran with [jscodeshift]((https://github
|
|
|
7
7
|
This will replace calls of `addWidget(widget)` to `addWidgets([widget])`, as well as `removeWidget(widget) to `removeWidgets([widget])`.
|
|
8
8
|
|
|
9
9
|
```
|
|
10
|
-
npx
|
|
10
|
+
npx @codeshift/cli --packages 'instantsearch-codemods#addWidget-to-addWidgets' <path>
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
### Notes
|
|
@@ -1,29 +1,9 @@
|
|
|
1
|
-
/* eslint-disable no-
|
|
1
|
+
/* eslint-disable no-console, import/no-commonjs */
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
// @MAJOR: remove this file and only keep only the `instantsearch-codemods` one
|
|
4
|
+
// also ensure this is removed from package.json
|
|
5
|
+
console.warn(
|
|
6
|
+
"This file is deprecated. Please use `npx @codeshift/cli --packages 'instantsearch-codemods#addWidget-to-addWidgets' <path>` instead."
|
|
7
|
+
);
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
const replaceSingularToPlural = (from, to) => (root) =>
|
|
10
|
-
root
|
|
11
|
-
.find(j.CallExpression, { callee: { property: { name: from } } })
|
|
12
|
-
.replaceWith((path) =>
|
|
13
|
-
j.callExpression(
|
|
14
|
-
j.memberExpression(path.value.callee.object, j.identifier(to), false),
|
|
15
|
-
[j.arrayExpression(path.value.arguments)]
|
|
16
|
-
)
|
|
17
|
-
);
|
|
18
|
-
|
|
19
|
-
const replaceAddWidget = replaceSingularToPlural('addWidget', 'addWidgets');
|
|
20
|
-
const replaceRemoveWidget = replaceSingularToPlural(
|
|
21
|
-
'removeWidget',
|
|
22
|
-
'removeWidgets'
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
replaceAddWidget(root);
|
|
26
|
-
replaceRemoveWidget(root);
|
|
27
|
-
|
|
28
|
-
return root.toSource(printOptions);
|
|
29
|
-
}
|
|
9
|
+
module.exports = require('instantsearch-codemods/src/addWidget-to-addWidgets');
|