Skip to content

Commit

Permalink
STCOR-937 transpile on publish
Browse files Browse the repository at this point in the history
Transpile on publish. Leverage the `prepare` npm lifecycle hook to
execute transpilation prior to publishing.

Refs STCOR-937
  • Loading branch information
zburke committed Jan 15, 2025
1 parent 792d3b2 commit f407eef
Show file tree
Hide file tree
Showing 6 changed files with 1,192 additions and 93 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Change history for stripes-core

## 10.3.0 IN PROGRESS
## 11.0.0 IN PROGRESS

* Conditionally use `/users-keycloak/_self` endpoint when `users-keycloak` interface is present. Refs STCOR-835.
* Wait longer before declaring a rotation request to be stale. Refs STCOR-895.
Expand All @@ -11,6 +11,7 @@
* `<Logout>` must consume `QueryClient` in order to supply it to `loginServices::logout()`. Refs STCOR-907.
* On resuming session, spread session and `_self` together to preserve session values. Refs STCOR-912.
* Fetch `/saml/check` when starting a new session, i.e. before discovery. Refs STCOR-933, STCOR-816.
* **BREAKING** Transpile on publish. Refs STCOR-937.

## [10.2.0](https://github.com/folio-org/stripes-core/tree/v10.2.0) (2024-10-11)
[Full Changelog](https://github.com/folio-org/stripes-core/compare/v10.1.1...v10.2.0)
Expand Down
59 changes: 0 additions & 59 deletions index.js

This file was deleted.

29 changes: 21 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
{
"name": "@folio/stripes-core",
"version": "10.3.0",
"version": "11.0.0",
"description": "The starting point for Stripes applications",
"license": "Apache-2.0",
"repository": "folio-org/stripes-core",
"repository": {
"type": "git",
"url": "git+https://github.com/folio-org/stripes-core.git"
},
"sideEffects": [
"*.css"
],
"publishConfig": {
"registry": "https://repository.folio.org/repository/npm-folio/"
},
"main": "dist/entry.js",
"files": [
"dist",
"translations",
"README.md",
"LICENSE",
"CONTRIBUTING.md",
"CHANGELOG.md"
],
"scripts": {
"start": "stripes serve",
"test": "yarn run test:jest && yarn run test:bigtest ",
Expand All @@ -20,7 +32,8 @@
"eslint": "eslint .",
"stylelint": "stylelint \"src/**/*.css\"",
"formatjs-compile": "formatjs compile-folder --ast --format simple ./translations/stripes-core ./translations/stripes-core/compiled",
"build-mod-descriptor": "stripes mod descriptor --full --strict | jq '.[]' > module-descriptor.json"
"build-mod-descriptor": "stripes mod descriptor --full --strict | jq '.[]' > module-descriptor.json",
"prepare": "stripes transpile"
},
"stripes": {
"okapiInterfaces": {
Expand Down Expand Up @@ -49,9 +62,9 @@
"@bigtest/mirage": "^0.0.1",
"@folio/eslint-config-stripes": "^7.0.0",
"@folio/jest-config-stripes": "^2.0.0",
"@folio/stripes-cli": "^3.0.0",
"@folio/stripes-components": "^12.3.0",
"@folio/stripes-connect": "^9.3.0",
"@folio/stripes-cli": "github:folio-org/stripes-cli#STRIPES-957",
"@folio/stripes-components": "github:folio-org/stripes-components#STRIPES-957",
"@folio/stripes-connect": "github:folio-org/stripes-connect#STRIPES-957",
"@folio/stripes-logger": "^1.0.0",
"@folio/stripes-testing": "^4.5.0",
"@formatjs/cli": "^6.1.3",
Expand Down Expand Up @@ -105,8 +118,8 @@
"use-deep-compare": "^1.1.0"
},
"peerDependencies": {
"@folio/stripes-components": "^12.0.0",
"@folio/stripes-connect": "^9.0.0",
"@folio/stripes-components": "github:folio-org/stripes-components#STRIPES-957",
"@folio/stripes-connect": "github:folio-org/stripes-connect#STRIPES-957",
"@folio/stripes-logger": "^1.0.0",
"moment": "^2.29.0",
"react": "^18.2.0",
Expand Down
6 changes: 3 additions & 3 deletions src/components/MainNav/NavButton/NavButton.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '@folio/stripes-components/lib/variables.css';
@import '@folio/stripes-components/dist/variables.css';

:root {
--main-nav-button-font-size: 1rem;
Expand Down Expand Up @@ -27,7 +27,7 @@
}

.navButton {
composes: interactionStylesControl from "~@folio/stripes-components/lib/sharedStyles/interactionStyles.css"; /* stylelint-disable-line */
composes: interactionStylesControl from "~@folio/stripes-components/dist/sharedStyles/interactionStyles.css"; /* stylelint-disable-line */
padding: 0 var(--gutter-static-one-third);
min-height: var(--main-nav-button-min-height);
font-size: var(--main-nav-button-font-size);
Expand All @@ -53,7 +53,7 @@
}

.isInteractive {
composes: interactionStyles from "~@folio/stripes-components/lib/sharedStyles/interactionStyles.css"; /* stylelint-disable-line */
composes: interactionStyles from "~@folio/stripes-components/dist/sharedStyles/interactionStyles.css"; /* stylelint-disable-line */
}

/* To make sure we overwrite default link colors */
Expand Down
59 changes: 59 additions & 0 deletions src/entry.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/* external utilities */
export { ConnectContext as RootContext, withConnect as withRoot } from '@folio/stripes-connect';
export { CalloutContext, useCallout } from './CalloutContext';

/* internal utilities */
export { stripesShape } from './Stripes';
export { withStripes, useStripes, StripesContext } from './StripesContext';
export { useModules } from './ModulesContext';
export { withModule, withModules } from './components/Modules';
export { default as stripesConnect } from './stripesConnect';
export { default as Pluggable } from './Pluggable';
export { updateUser, updateTenant, validateUser } from './loginServices';
export { default as coreEvents } from './events';
export { default as useOkapiKy } from './useOkapiKy';
export { default as withOkapiKy } from './withOkapiKy';
export { default as useCustomFields } from './useCustomFields';
export { default as createReactQueryClient } from './createReactQueryClient';

/* components */
export { default as AppContextMenu } from './components/MainNav/CurrentApp/AppContextMenu';
export { default as IfInterface } from './components/IfInterface';
export { default as IfPermission } from './components/IfPermission';
export { default as IfAnyPermission } from './components/IfAnyPermission';
export { default as TitleManager } from './components/TitleManager';
export { default as HandlerManager } from './components/HandlerManager';
export { default as IntlConsumer } from './components/IntlConsumer';
export { default as AppIcon } from './components/AppIcon';
export { Route, Switch, Redirect } from './components/NestedRouter';
export {
ModuleHierarchyContext,
ModuleHierarchyProvider,
useModuleHierarchy,
useNamespace,
withNamespace,
LastVisitedContext,
withLastVisited,
} from './components';

/* Queries */
export { useChunkedCQLFetch } from './queries';
export { getUserTenantsPermissions } from './queries';

/* Hooks */
export { useUserTenantPermissions } from './hooks';

/* misc */
export { supportedLocales } from './loginServices';
export { supportedNumberingSystems } from './loginServices';
export { userLocaleConfig } from './loginServices';
export * from './consortiaServices';
export { default as queryLimit } from './queryLimit';
export { default as init } from './init';

/* localforage wrappers hide the session key */
export { getOkapiSession, getTokenExpiry, setTokenExpiry } from './loginServices';

export { registerServiceWorker, unregisterServiceWorker } from './serviceWorkerRegistration';

export { getEventHandler } from './handlerService';
Loading

0 comments on commit f407eef

Please sign in to comment.