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.
@@ -1,2 +1,2 @@
1
- declare const _default: "4.71.0";
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.0';
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.0",
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.46.0",
60
- "@instantsearch/tests": "1.46.0",
61
- "@instantsearch/testutils": "1.35.0",
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": "3707501a19e582e8263a3ae5a9d51ff3f5263361"
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 jscodeshift --transform scripts/transforms/addWidget-addWidgets.js --extensions='ts,js,tsx' <path>
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-shadow */
1
+ /* eslint-disable no-console, import/no-commonjs */
2
2
 
3
- export default function transform(file, api, options) {
4
- const j = api.jscodeshift;
5
- const printOptions = options.printOptions || { quote: 'single' };
6
- const root = j(file.source);
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
- // replace xxx[from](arguments) to xxx[to]([arguments])
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');