Skip to content

Commit

Permalink
STCOM-1397 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 transpilationi prior to publishing. Relocate `hooks` and `utils`
into `lib` to simplify transpilation and follow JS SOP. This required
updates to some import paths but no substantive changes otherwise.

In `lib/util/currencies`, the import that pulls in currency data changed
because ... it's not really clear, except the previous import did not
work and the updated import looks a little simpler. 🤷

unrelated cleanup:
* remove unused file `Jenkinsfile.deprecated`
* clean up `package.json`:
  * remove  `engines`
  * correctly specify `repository`

Refs STCOM-1397
  • Loading branch information
zburke committed Jan 15, 2025
1 parent ef2336c commit 5897ab9
Show file tree
Hide file tree
Showing 112 changed files with 1,316 additions and 299 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-components

## 12.3.0 IN PROGRESS
## 13.0.0 IN PROGRESS

* `TextArea` - move focus to the field after clearing the field by clicking on the `x` icon. Refs STCOM-1369.
* Change `Repeatable field` focus behaviour. Refs STCOM-1341.
Expand All @@ -19,6 +19,7 @@
* `<Datepicker>` fix for `<Calendar>` tabIndex when changing the year. Refs STCOM-1395.
* `<Tooltip>` should allow for tooltip content to be hovered without closing the tooltip. Refs STCOM-1391.
* `<AdvancedSearchRow>` - change `aria-label` for the input box to enter a search query and the Boolean operator dropdown. Refs STCOM-1195.
* Rearrange source files per JS SOP and transpile on publish. Refs STCOM-1397.

## [12.2.0](https://github.com/folio-org/stripes-components/tree/v12.2.0) (2024-10-11)
[Full Changelog](https://github.com/folio-org/stripes-components/compare/v12.1.0...v12.2.0)
Expand Down
9 changes: 0 additions & 9 deletions Jenkinsfile.deprecated

This file was deleted.

196 changes: 0 additions & 196 deletions index.js

This file was deleted.

2 changes: 1 addition & 1 deletion lib/Accordion/Accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { DefaultAccordionHeader } from './headers';
import css from './Accordion.css';
import { HotKeys } from '../HotKeys';
import { withAccordionSet } from './AccordionSetContext';
import omitProps from '../../util/omitProps';
import omitProps from '../util/omitProps';

const propTypes = {
accordionSet: PropTypes.object,
Expand Down
2 changes: 1 addition & 1 deletion lib/AutoSuggest/AutoSuggest.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Popper, { OVERLAY_MODIFIERS } from '../Popper';
import TextField from '../TextField';
import formField from '../FormField';
import parseMeta from '../FormField/parseMeta';
import useProvidedIdOrCreate from '../../hooks/useProvidedIdOrCreate';
import useProvidedIdOrCreate from '../hooks/useProvidedIdOrCreate';
import css from './AutoSuggest.css';

const getInputWidth = (container) => container?.offsetWidth;
Expand Down
2 changes: 1 addition & 1 deletion lib/Button/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import className from 'classnames';
import { Link } from 'react-router-dom';
import PropTypes from 'prop-types';
import css from './Button.css';
import omitProps from '../../util/omitProps';
import omitProps from '../util/omitProps';

export const propTypes = {
align: PropTypes.string,
Expand Down
4 changes: 2 additions & 2 deletions lib/Card/Card.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import React from 'react';
import PropTypes from 'prop-types';
import className from 'classnames';

import omitProps from '../../util/omitProps';
import omitProps from '../util/omitProps';

import css from './Card.css';
import DefaultCardHeader from './headers/DefaultCardHeader';
import StripesOverlayWrapper from '../../util/StripesOverlayWrapper';
import StripesOverlayWrapper from '../util/StripesOverlayWrapper';

export default class Card extends React.Component {
static propTypes = {
Expand Down
2 changes: 1 addition & 1 deletion lib/Checkbox/Checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { FormattedMessage } from 'react-intl';
import formField from '../FormField';
import Label from '../Label';
import Asterisk from '../Label/components/Asterisk';
import separateComponentProps from '../../util/separateComponentProps';
import separateComponentProps from '../util/separateComponentProps';
import parseMeta from '../FormField/parseMeta';
import css from './Checkbox.css';

Expand Down
2 changes: 1 addition & 1 deletion lib/CountrySelection/CountrySelection.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { useIntl } from 'react-intl';
import countries from '../../util/countries';
import countries from '../util/countries';

import Selection from '../Selection';

Expand Down
2 changes: 1 addition & 1 deletion lib/CurrencySelect/CurrencySelect.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';

import useCurrencyOptions from '../../hooks/useCurrencyOptions';
import useCurrencyOptions from '../hooks/useCurrencyOptions';

import Select from '../Select';

Expand Down
2 changes: 1 addition & 1 deletion lib/CurrencySelect/tests/CurrencySelect-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
currenciesByName,
currenciesByNumber,
currenciesOptions,
} from '../../../util/currencies';
} from '../../util/currencies';

import CurrencySelect from '../CurrencySelect';

Expand Down
6 changes: 3 additions & 3 deletions lib/Datepicker/Datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { FormattedMessage, injectIntl } from 'react-intl';
import PropTypes from 'prop-types';
import uniqueId from 'lodash/uniqueId';
import pick from 'lodash/pick';
import RootCloseWrapper from '../../util/RootCloseWrapper';
import nativeChangeField from '../../util/nativeChangeFieldValue';
import RootCloseWrapper from '../util/RootCloseWrapper';
import nativeChangeField from '../util/nativeChangeFieldValue';
import formField from '../FormField';
import Popper, { AVAILABLE_PLACEMENTS } from '../Popper';
import IconButton from '../IconButton';
Expand All @@ -17,7 +17,7 @@ import {
defaultOutputFormatter,
getBackendDateStandard
} from './datepicker-util';
import { getLocaleDateFormat } from '../../util/dateTimeUtils';
import { getLocaleDateFormat } from '../util/dateTimeUtils';

const pickDataProps = (props) => pick(props, (v, key) => key.indexOf('data-test') !== -1);

Expand Down
4 changes: 2 additions & 2 deletions lib/Dropdown/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import PropTypes from 'prop-types';
import classNames from 'classnames';
import css from './Dropdown.css';
import Popdown from './Popdown';
import omit from '../../util/omitProps';
import omit from '../util/omitProps';
import {
getNextFocusable,
getPreviousFocusable,
getLastFocusable,
getFirstFocusable
} from '../../util/getFocusableElements';
} from '../util/getFocusableElements';

const propTypes = {
children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
Expand Down
4 changes: 2 additions & 2 deletions lib/Dropdown/Popdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
getNextFocusable,
getLastFocusable,
getFirstFocusable
} from '../../util/getFocusableElements';
import composeEventHandlers from '../../util/composeEventHandlers';
} from '../util/getFocusableElements';
import composeEventHandlers from '../util/composeEventHandlers';

const DefaultTrigger = ({ getTriggerProps, buttonProps, label }) => (
<DropdownButton
Expand Down
2 changes: 1 addition & 1 deletion lib/DropdownMenu/DropdownMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { cloneElement, useRef } from 'react';
import isBoolean from 'lodash/isBoolean';
import useRootClose from 'react-overlays/useRootClose';
import PropTypes from 'prop-types';
import separateComponentProps from '../../util/separateComponentProps';
import separateComponentProps from '../util/separateComponentProps';
import css from './DropdownMenu.css';

const propTypes = {
Expand Down
2 changes: 1 addition & 1 deletion lib/Editor/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import '!style-loader!css-loader!react-quill/dist/quill.snow.css';

import formField from '../FormField';
import css from './Editor.css';
import omitProps from '../../util/omitProps';
import omitProps from '../util/omitProps';
import sharedInputStylesHelper from '../sharedStyles/sharedInputStylesHelper';
import formStyles from '../sharedStyles/form.css';
import parseMeta from '../FormField/parseMeta';
Expand Down
2 changes: 1 addition & 1 deletion lib/ExportCsv/exportToCsv.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Parser } from 'json2csv';
import { OVERLAY_CONTAINER_ID } from '../../util/consts';
import { OVERLAY_CONTAINER_ID } from '../util/consts';

// Ignoring next block in tests since we don't have a great way to suppress downloads in tests
// istanbul ignore next
Expand Down
2 changes: 1 addition & 1 deletion lib/FocusLink/FocusLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import css from './FocusLink.css';
import { getNextFocusable } from '../../util/getFocusableElements';
import { getNextFocusable } from '../util/getFocusableElements';

const propTypes = {
children: PropTypes.oneOfType([
Expand Down
2 changes: 1 addition & 1 deletion lib/FormattedDate/FormattedDate.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import { FormattedDate as FD } from 'react-intl';
import iso8601Timestamp from '../../util/iso8601Timestamp';
import iso8601Timestamp from '../util/iso8601Timestamp';

/**
* Take a date-string formatted like
Expand Down
2 changes: 1 addition & 1 deletion lib/FormattedTime/FormattedTime.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import { FormattedTime as FT } from 'react-intl';
import iso8601Timestamp from '../../util/iso8601Timestamp';
import iso8601Timestamp from '../util/iso8601Timestamp';

/**
* Take a date-string formatted like
Expand Down
Loading

0 comments on commit 5897ab9

Please sign in to comment.