Skip to content

Commit

Permalink
Version v2.5.1
Browse files Browse the repository at this point in the history
### Fixes
- Makes sure images served from EU are properly handled (#1163)
  • Loading branch information
EmilyZhang777 authored Jan 29, 2024
2 parents 0c1800e + f6f562e commit e6a87d9
Show file tree
Hide file tree
Showing 7 changed files with 882 additions and 849 deletions.
724 changes: 352 additions & 372 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@yext/search-core",
"version": "2.5.0",
"version": "2.5.1",
"description": "Typescript Networking Library for the Yext Search API",
"main": "./dist/commonjs/src/index.js",
"module": "./dist/esm/src/index.js",
Expand Down Expand Up @@ -74,7 +74,7 @@
"jest-environment-jsdom": "^28.1.0",
"ts-loader": "^8.4.0",
"typescript": "^4.0.3",
"webpack": "^5.73.0",
"webpack": "^5.90.0",
"webpack-cli": "^4.4.0"
},
"dependencies": {
Expand Down
982 changes: 514 additions & 468 deletions test-site/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion test-site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"devDependencies": {
"ts-loader": "^9.2.6",
"typescript": "^4.4.3",
"webpack": "^5.58.1",
"webpack": "^5.90.0",
"webpack-cli": "^4.9.0"
},
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions test-site/src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import questionRequest from './requests/questionRequest';
import { univeralAutocompleteRequest, verticalAutocompleteRequest, filterSearchRequest } from './requests/autocompleteRequests';

const coreConfig = {
apiKey: 'df4b24f4075800e5e9705090c54c6c13',
apiKey: process.env.API_KEY,
experienceKey: 'rosetest',
locale: 'en',
experienceVersion: 'PRODUCTION',
Expand Down Expand Up @@ -62,13 +62,13 @@ export async function filterSearch() {
}

function loadingSpinner() {
element.innerHTML = 'Loading...';
element.textContent = 'Loading...';
}

function updateUI(data, startTime, msg) {
const latency = new Date().getTime() - startTime + 'ms';
const dataString = JSON.stringify(data, undefined, 2);
element.innerHTML = latency + '\n' + dataString;
element.textContent = latency + '\n' + dataString;

console.log(msg);
console.log(data);
Expand Down
6 changes: 3 additions & 3 deletions test-site/src/ts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { univeralAutocompleteRequest, verticalAutocompleteRequest, filterSearchR
import initDirectAnswers from './initDirectAnswers';

const coreConfig: SearchConfig = {
apiKey: '2d8c550071a64ea23e263118a2b0680b',
apiKey: process.env.API_KEY,
experienceKey: 'slanswers',
locale: 'en',
experienceVersion: 'PRODUCTION',
Expand Down Expand Up @@ -72,13 +72,13 @@ export async function filterSearch(): Promise<void> {
}

function loadingSpinner() {
element.innerHTML = 'Loading...';
element.textContent = 'Loading...';
}

function updateUI(data: unknown, startTime: number, msg: string) {
const latency = new Date().getTime() - startTime + 'ms';
const dataString = JSON.stringify(data, undefined, 2);
element.innerHTML = latency + '\n' + dataString;
element.textContent = latency + '\n' + dataString;

console.log(msg);
console.log(data);
Expand Down
7 changes: 7 additions & 0 deletions test-site/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
const path = require('path');
const webpack = require('webpack');

const webpackPlugin = new webpack.DefinePlugin({
'process.env.API_KEY': JSON.stringify(process.env.API_KEY),
});

module.exports = [{
mode: 'development',
Expand All @@ -20,6 +25,7 @@ module.exports = [{
path: path.resolve(__dirname, 'dist'),
libraryTarget: 'window'
},
plugins: [webpackPlugin],
}, {
mode: 'development',
entry: './src/js/index.js',
Expand All @@ -32,4 +38,5 @@ module.exports = [{
libraryTarget: 'window'
},
target: ['web', 'es5'],
plugins: [webpackPlugin],
}];

0 comments on commit e6a87d9

Please sign in to comment.