Skip to content

Commit

Permalink
update for stripes v9
Browse files Browse the repository at this point in the history
`@folio/stripes` v9 updates including:

* stripes v9 (duh)
* stripes-cli v3
* eslint-config-stripes v7
* jest-config-stripes v2
* node v18 (in CI)
* purge remaining bigtest/karma cruft
  • Loading branch information
zburke committed Dec 4, 2023
1 parent efdb038 commit e700f98
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 86 deletions.
10 changes: 0 additions & 10 deletions Jenkinsfile.deprecated

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# __uiAppName__

Copyright (C) 2021 The Open Library Foundation
Copyright (C) 2023 The Open Library Foundation

This software is distributed under the terms of the Apache License, Version 2.0. See the file "[LICENSE](LICENSE)" for more information.

Expand Down
28 changes: 5 additions & 23 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,10 @@
// eslint-disable-next-line import/no-extraneous-dependencies
const path = require('path');

const esModules = ['@folio', 'ky'].join('|');
const config = require('@folio/jest-config-stripes');

module.exports = {
collectCoverageFrom: [
'**/(lib|src)/**/*.{js,jsx}',
'!**/node_modules/**',
'!**/test/jest/**',
],
coverageDirectory: './artifacts/coverage-jest/',
coverageReporters: ['lcov'],
reporters: ['jest-junit', 'default'],
transform: { '^.+\\.(js|jsx)$': path.join(__dirname, './test/jest/jest-transformer.js') },
transformIgnorePatterns: [`/node_modules/(?!${esModules})`],
moduleNameMapper: {
'^.+\\.(css)$': 'identity-obj-proxy',
'^.+\\.(svg)$': 'identity-obj-proxy',
},
testMatch: ['**/(lib|src)/**/?(*.)test.{js,jsx}'],
testPathIgnorePatterns: ['/node_modules/', '/test/bigtest/', '/test/ui-testing/'],
...config,
setupFiles: [
path.join(__dirname, './test/jest/setupTests.js'),
'jest-canvas-mock'
...config.setupFiles,
path.join(__dirname, './test/jest/setupFiles.js'),
],
setupFilesAfterEnv: [path.join(__dirname, './test/jest/jest.setup.js')],
};
};
6 changes: 0 additions & 6 deletions karma.conf.js

This file was deleted.

44 changes: 14 additions & 30 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,49 +5,33 @@
"main": "src/index.js",
"repository": "",
"license": "Apache-2.0",
"engines": {
"node": ">=12.20.1"
},
"scripts": {
"start": "stripes serve",
"build": "stripes build --output ./output",
"build-mod-descriptor": "stripes mod descriptor --full --strict | jq '.[]' > module-descriptor.json ",
"formatjs-compile": "formatjs compile-folder --ast --format simple ./translations/ui-__packageName__ ./translations/ui-__packageName__/compiled",
"formatjs-compile": "stripes translate compile",
"lint": "eslint .",
"test": "jest"
},
"devDependencies": {
"@babel/core": "^7.9.0",
"@babel/core": "^7.21.0",
"@babel/eslint-parser": "^7.15.0",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/plugin-proposal-decorators": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/preset-react": "^7.9.0",
"@folio/eslint-config-stripes": "^6.0.0",
"@folio/stripes": "^7.0.0",
"@folio/stripes-cli": "^__cliVersion__ || ^2.4.0",
"@folio/stripes-core": "^8.0.0",
"@formatjs/cli": "^4.2.29",
"@jest/globals": "^26.6.2",
"@testing-library/dom": "^7.26.3",
"@testing-library/jest-dom": "^5.11.9",
"@testing-library/react": "^11.2.5",
"@testing-library/user-event": "^12.1.10",
"babel-eslint": "^10.1.0",
"babel-jest": "^26.6.3",
"chai": "^4.2.0",
"@folio/eslint-config-stripes": "^7.0.0",
"@folio/jest-config-stripes": "^2.0.0",
"@folio/stripes": "^9.1.0",
"@folio/stripes-cli": "^__cliVersion__ || ^3.0.0",
"@folio/stripes-core": "^10.1.0",
"core-js": "^3.6.4",
"eslint": "^7.32.0",
"inflected": "^2.0.4",
"jest": "^26.6.3",
"jest-canvas-mock": "^2.3.0",
"jest-junit": "^12.0.0",
"mocha": "^5.2.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-intl": "^5.8.0",
"react-redux": "^7.2.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-intl": "^6.4.4",
"react-redux": "^8.0.5",
"react-router-dom": "^5.2.0",
"redux": "^4.0.5",
"regenerator-runtime": "^0.13.3"
Expand All @@ -56,9 +40,9 @@
"prop-types": "^15.6.0"
},
"peerDependencies": {
"@folio/stripes": "^7.0.0",
"react": "*",
"react-intl": "^5.8.0",
"@folio/stripes": "^9.0.0",
"react": "18.2.0",
"react-intl": "^6.4.4",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0"
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/greeting-modal/greeting-modal.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import {
render,
cleanup,
} from '@testing-library/react';
} from '@folio/jest-config-stripes/testing-library/react';
import { FormattedMessage } from 'react-intl';

import '../../../test/jest/__mock__';
Expand Down
2 changes: 1 addition & 1 deletion src/components/new-app-greeting/new-app-greeting.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Router } from 'react-router-dom';
import {
render,
cleanup,
} from '@testing-library/react';
} from '@folio/jest-config-stripes/testing-library/react';
import { createMemoryHistory } from 'history';
import { FormattedMessage } from 'react-intl';

Expand Down
2 changes: 1 addition & 1 deletion src/routes/application.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Router } from 'react-router-dom';
import {
render,
cleanup,
} from '@testing-library/react';
} from '@folio/jest-config-stripes/testing-library/react';
import { createMemoryHistory } from 'history';

import '../../test/jest/__mock__';
Expand Down
2 changes: 1 addition & 1 deletion src/settings/general-settings.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Router } from 'react-router-dom';
import {
render,
cleanup,
} from '@testing-library/react';
} from '@folio/jest-config-stripes/testing-library/react';
import { createMemoryHistory } from 'history';
import { FormattedMessage } from 'react-intl';

Expand Down
2 changes: 1 addition & 1 deletion src/settings/some-feature-settings.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Router } from 'react-router-dom';
import {
render,
cleanup,
} from '@testing-library/react';
} from '@folio/jest-config-stripes/testing-library/react';
import { createMemoryHistory } from 'history';
import { FormattedMessage } from 'react-intl';

Expand Down
5 changes: 0 additions & 5 deletions test/jest/babel.config.js

This file was deleted.

5 changes: 0 additions & 5 deletions test/jest/jest-transformer.js

This file was deleted.

1 change: 0 additions & 1 deletion test/jest/jest.setup.js

This file was deleted.

File renamed without changes.

0 comments on commit e700f98

Please sign in to comment.