Skip to content
Snippets Groups Projects
Unverified Commit e7ba59a9 authored by Nick Budak's avatar Nick Budak Committed by GitHub
Browse files

Merge pull request #3547 from ProjectMirador/update-dev-deps

Update development dependencies and test with current versions of nodejs
parents fe18ed21 1e65f2de
Branches
No related tags found
No related merge requests found
...@@ -94,9 +94,7 @@ export function* setWindowStartingCanvas(action) { ...@@ -94,9 +94,7 @@ export function* setWindowStartingCanvas(action) {
const windowId = action.id || action.window.id; const windowId = action.id || action.window.id;
if (canvasId) { if (canvasId) {
const thunk = yield call( const thunk = yield call(setCanvas, windowId, canvasId, null, { preserveViewport: !!action.payload });
setCanvas, windowId, canvasId, null, { preserveViewport: !!action.payload },
);
yield put(thunk); yield put(thunk);
} else { } else {
const manifestoInstance = yield select(getManifestoInstance, { manifestId }); const manifestoInstance = yield select(getManifestoInstance, { manifestId });
...@@ -157,7 +155,12 @@ export function* setCurrentAnnotationsOnCurrentCanvas({ ...@@ -157,7 +155,12 @@ export function* setCurrentAnnotationsOnCurrentCanvas({
if (companionWindowIds.length === 0) return; if (companionWindowIds.length === 0) return;
const annotationBySearch = yield select( const annotationBySearch = yield select(
getAnnotationsBySearch, { canvasIds: visibleCanvases, companionWindowIds, windowId }, getAnnotationsBySearch,
{
canvasIds: visibleCanvases,
companionWindowIds,
windowId,
},
); );
yield all( yield all(
...@@ -213,9 +216,7 @@ export function* setCanvasOfFirstSearchResult({ companionWindowId, windowId }) { ...@@ -213,9 +216,7 @@ export function* setCanvasOfFirstSearchResult({ companionWindowId, windowId }) {
if (selectedIds.length !== 0) return; if (selectedIds.length !== 0) return;
const annotations = yield select( const annotations = yield select(getSortedSearchAnnotationsForCompanionWindow, { companionWindowId, windowId });
getSortedSearchAnnotationsForCompanionWindow, { companionWindowId, windowId },
);
if (!annotations || annotations.length === 0) return; if (!annotations || annotations.length === 0) return;
yield put(selectAnnotation(windowId, annotations[0].id)); yield put(selectAnnotation(windowId, annotations[0].id));
......
...@@ -108,8 +108,8 @@ export const getSortedSearchHitsForCompanionWindow = createSelector( ...@@ -108,8 +108,8 @@ export const getSortedSearchHitsForCompanionWindow = createSelector(
[ [
getSearchHitsForCompanionWindow, getSearchHitsForCompanionWindow,
getCanvases, getCanvases,
(state, { companionWindowId, windowId }) => annotationUri => getResourceAnnotationForSearchHit( (state, { companionWindowId, windowId }) => (
state, { annotationUri, companionWindowId, windowId }, annotationUri => getResourceAnnotationForSearchHit(state, { annotationUri, companionWindowId, windowId })
), ),
], ],
(searchHits, canvases, annotationForSearchHit) => { (searchHits, canvases, annotationForSearchHit) => {
...@@ -229,9 +229,7 @@ const getAnnotationById = createSelector( ...@@ -229,9 +229,7 @@ const getAnnotationById = createSelector(
export const getCanvasForAnnotation = createSelector( export const getCanvasForAnnotation = createSelector(
[ [
getAnnotationById, getAnnotationById,
(state, { windowId }) => canvasId => getCanvas( (state, { windowId }) => canvasId => getCanvas(state, { canvasId, windowId }),
state, { canvasId, windowId },
),
], ],
(annotation, getCanvasById) => { (annotation, getCanvasById) => {
const canvasId = annotation && annotation.targetId; const canvasId = annotation && annotation.targetId;
......
...@@ -27,12 +27,12 @@ const baseConfig = mode => ({ ...@@ -27,12 +27,12 @@ const baseConfig = mode => ({
minimizer: [ minimizer: [
new TerserPlugin({ new TerserPlugin({
extractComments: true, extractComments: true,
sourceMap: true,
}), }),
], ],
}, },
output: { output: {
filename: 'mirador.min.js', filename: 'mirador.min.js',
hashFunction: 'md5',
library: 'Mirador', library: 'Mirador',
libraryExport: 'default', libraryExport: 'default',
libraryTarget: 'umd', libraryTarget: 'umd',
...@@ -74,12 +74,12 @@ module.exports = (env, options) => { ...@@ -74,12 +74,12 @@ module.exports = (env, options) => {
return { return {
...config, ...config,
devServer: { devServer: {
contentBase: [ hot: true,
port: 4444,
static: [
'./__tests__/integration/mirador', './__tests__/integration/mirador',
'./__tests__/fixtures', './__tests__/fixtures',
], ],
hot: true,
port: 4444,
}, },
devtool: 'eval-source-map', devtool: 'eval-source-map',
mode: 'development', mode: 'development',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment