Skip to content

Commit e288300

Browse files
authored
Update master to main (#497)
1 parent 8f1b7f5 commit e288300

File tree

96 files changed

+512
-512
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+512
-512
lines changed

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
#### If applicable
88
- [ ] My work includes tests or is validated by existing tests.
9-
- [ ] I have updated the [esm-framework mock](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-framework/mock.tsx) to reflect any API changes I have made.
9+
- [ ] I have updated the [esm-framework mock](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-framework/mock.tsx) to reflect any API changes I have made.
1010

1111
## Summary
1212
<!-- Please describe what problems your PR addresses. -->

.github/workflows/ci.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name: OpenMRS CI
33
on:
44
workflow_dispatch: # temporary, for debugging
55
push:
6-
branches: [master]
6+
branches: [main]
77
pull_request:
8-
branches: [master]
8+
branches: [main]
99
release:
1010
types:
1111
- created
@@ -25,11 +25,11 @@ jobs:
2525

2626
- name: Cache dependencies
2727
id: cache
28-
uses: actions/cache@v3
28+
uses: actions/cache@v3
2929
with:
3030
path: '**/node_modules'
3131
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
32-
32+
3333
- name: Install dependencies
3434
if: steps.cache.outputs.cache-hit != 'true'
3535
run: yarn
@@ -39,10 +39,10 @@ jobs:
3939
with:
4040
repo-token: ${{ secrets.GITHUB_TOKEN }}
4141
server-token: ${{ secrets.TURBO_SERVER_TOKEN }}
42-
42+
4343
- name: Run lint, tests and typecheck code
44-
run: yarn run verify
45-
44+
run: yarn run verify
45+
4646
- name: Run build
4747
run: yarn turbo run build --color --api="http://127.0.0.1:9080" --token="${{ secrets.TURBO_SERVER_TOKEN }}" --team="${{ github.repository_owner }}"
4848

@@ -60,14 +60,14 @@ jobs:
6060
with:
6161
node-version: "16.15"
6262
registry-url: "https://registry.npmjs.org"
63-
63+
6464
- name: Cache dependencies
6565
id: cache
66-
uses: actions/cache@v3
66+
uses: actions/cache@v3
6767
with:
6868
path: '**/node_modules'
6969
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
70-
70+
7171
- name: Install dependencies
7272
if: steps.cache.outputs.cache-hit != 'true'
7373
run: yarn
@@ -136,11 +136,11 @@ jobs:
136136

137137
- name: Cache dependencies
138138
id: cache
139-
uses: actions/cache@v3
139+
uses: actions/cache@v3
140140
with:
141141
path: '**/node_modules'
142142
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
143-
143+
144144
- name: Install dependencies
145145
if: steps.cache.outputs.cache-hit != 'true'
146146
run: yarn

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Check documentation
22

33
on:
44
push:
5-
branches: [master]
5+
branches: [main]
66
pull_request:
7-
branches: [master]
7+
branches: [main]
88
schedule:
99
- cron: "0 9 * * *"
1010

.github/workflows/size.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Report bundle size
22

33
on:
44
pull_request_target:
5-
branches: [master]
5+
branches: [main]
66

77
jobs:
88
file_size_impact:

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ set -e # die on error
55

66
yarn run extract-translations
77
yarn pretty-quick --staged
8-
yarn lerna run document --since master
8+
yarn lerna run document --since main

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ to indicate big new features and breaking changes, and patch changes (e.g. `3.2.
155155
otherwise.
156156

157157
Note that this command will not create a new tag, nor publish the packages.
158-
After running it, make a PR or merge to `master` with the resulting changeset.
158+
After running it, make a PR or merge to `main` with the resulting changeset.
159159

160160
Once the version bump is merged, go to GitHub and
161161
[draft a new release](https://github.com/openmrs/openmrs-esm-core/releases/new).

docs/getting_started/release_and_deployment.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ Distributions use frontend modules which are published as packages in NPM.
66
Those distributions can refer to frontend module versions by number (e.g. `3.1.0`)
77
or by tag (e.g. `latest`).
88

9-
GitHub Actions is used to publish frontend modules from the `master` branch
9+
GitHub Actions is used to publish frontend modules from the `main` branch
1010
to the `next` tag.
1111
You can see the published versions of each frontend module on npmjs.com. See for example
1212
[@openmrs/esm-login-app](https://www.npmjs.com/package/@openmrs/esm-login-app?activeTab=versions).
1313
The [OpenMRS CI server](https://dev3.openmrs.org/openmrs/spa/login)
1414
always shows the `next` version of all frontend modules (i.e., the latest from the
15-
`master` branch).
15+
`main` branch).
1616

1717
You can version a frontend module by creating a release in GitHub. This will trigger
1818
GitHub Actions to publish a new version of the package with the `latest` tag.

docs/getting_started/setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ the import map overrides panel to override the existing import map
104104
entry, or add your frontend module as a new entry.
105105

106106
For example, if you run `yarn serve` in
107-
[esm-login-app](https://github.com/openmrs/openmrs-esm-core/tree/master/packages/apps/esm-login-app),
107+
[esm-login-app](https://github.com/openmrs/openmrs-esm-core/tree/main/packages/apps/esm-login-app),
108108
and if it says something like `Project is running at http://localhost:8080/`,
109109
as well as something like `asset openmrs-esm-login-app.js`, then in the import
110110
map overrides you can click on the entry for `openmrs-esm-login-app` and give it the value

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
subMaxLevel: 1,
2424
relativePath: true,
2525
plugins: [
26-
EditOnGithubPlugin.create("https://github.com/openmrs/openmrs-esm-core/edit/master/docs/")
26+
EditOnGithubPlugin.create("https://github.com/openmrs/openmrs-esm-core/edit/main/docs/")
2727
]
2828
}
2929
</script>

docs/main/config.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ colorPicker: {
148148
```
149149
150150
For convenience, some common validators are provided out of the box. See the
151-
[API / validators](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-framework/docs/API.md#validators).
151+
[API / validators](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-framework/docs/API.md#validators).
152152
153153
#### Arrays
154154
@@ -229,7 +229,7 @@ the defaults for configuration elements for which no values have been provided.
229229
230230
A React Hook is provided to hide the asynchronicity of config loading. The
231231
`moduleName`provided to the
232-
[`openmrsComponentDecorator` in esm-react-utils](https://github.com/openmrs/openmrs-esm-core/tree/master/packages/framework/esm-react-utils)
232+
[`openmrsComponentDecorator` in esm-react-utils](https://github.com/openmrs/openmrs-esm-core/tree/main/packages/framework/esm-react-utils)
233233
is used to look up the configuration elsewhere in the application.
234234
235235
```js
@@ -301,7 +301,7 @@ the element, but this may change in future versions.
301301
302302
#### `_type`
303303
304-
One of the values from [the `Type` enum](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-framework/docs/enums/Type.md). Used for validation and to help the
304+
One of the values from [the `Type` enum](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-framework/docs/enums/Type.md). Used for validation and to help the
305305
implementer tools work with the element.
306306
307307
Should always appear alongside `_default`.
@@ -318,10 +318,10 @@ Can be used anywhere within the schema structure.
318318
An array of validator objects.
319319
320320
Some common validators are
321-
provided: [API / validators](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-framework/docs/API.md#config-validation-functions).
321+
provided: [API / validators](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-framework/docs/API.md#config-validation-functions).
322322
323323
Custom validators should
324-
be created with the [validator](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-framework/docs/API.md#validator) function.
324+
be created with the [validator](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-framework/docs/API.md#validator) function.
325325
326326
Can be used anywhere within the schema structure.
327327
@@ -333,7 +333,7 @@ contained in the array.
333333
334334
## API Documentation
335335
336-
See the Config Functions section of the [API docs](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-framework/docs/API.md).
336+
See the Config Functions section of the [API docs](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-framework/docs/API.md).
337337
338338
## The RFC
339339

docs/main/data.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ Some data is available using higher-level functions or custom React Hooks provid
1414
by `@openmrs/esm-framework`. These should be used when available.
1515

1616
All of this functionality (React hooks excepted) is provided by the
17-
[`@openmrs/esm-api`](https://github.com/openmrs/openmrs-esm-core/tree/master/packages/framework/esm-api)
17+
[`@openmrs/esm-api`](https://github.com/openmrs/openmrs-esm-core/tree/main/packages/framework/esm-api)
1818
package, which is part of `@openmrs/esm-framework`.
1919
The React hooks are in
20-
[`@openmrs/esm-react-utils`](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils),
20+
[`@openmrs/esm-react-utils`](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-react-utils),
2121
which is also part of `@openmrs/esm-framework`. See the
22-
[API Docs](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-framework/docs/API.md).
22+
[API Docs](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-framework/docs/API.md).
2323

2424
## FHIR
2525

@@ -39,7 +39,7 @@ If you have questions about FHIR support in OpenMRS, you can ask in the
3939

4040
Some administrative endpoints will likely never have a proper representation in FHIR (e.g., endpoints for managing encounter types). When no suitable FHIR endpoint is available, you will want to use a different OpenMRS server API. The [REST Web Services API](https://rest.openmrs.org/) is used widely across many of our frontend modules.
4141

42-
We recommend using [SWR](https://swr.vercel.app/docs/data-fetching) based hooks and the [`openmrsFetch`](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-framework/docs/API.md#openmrsfetch) fetcher function to retrieve data from the server. SWR offers a host of features that help us deliver an improved user experience.
42+
We recommend using [SWR](https://swr.vercel.app/docs/data-fetching) based hooks and the [`openmrsFetch`](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-framework/docs/API.md#openmrsfetch) fetcher function to retrieve data from the server. SWR offers a host of features that help us deliver an improved user experience.
4343

4444
Here's an example of a custom SWR hook that retrieves visits data.
4545

@@ -131,6 +131,6 @@ Some API objects are made available via React hooks (or via framework-agnostic s
131131
The hooks are in
132132
`@openmrs/esm-react-utils`,
133133
and the subscription-yielding equivalents are in
134-
[`@openmrs/esm-api`](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-framework/docs/API.md#api-functions).
135-
See for example [`useVisitTypes`](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-framework/docs/API.md#usevisittypes)
136-
and the corresponding [`getVisitTypes`](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-framework/docs/API.md#getvisittypes).
134+
[`@openmrs/esm-api`](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-framework/docs/API.md#api-functions).
135+
See for example [`useVisitTypes`](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-framework/docs/API.md#usevisittypes)
136+
and the corresponding [`getVisitTypes`](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-framework/docs/API.md#getvisittypes).

docs/main/dates.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ are intended to accomodate that variation.
88
## Formatting for display
99

1010
Date objects can be displayed in a variety of standard formats using the
11-
[formatDate](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-framework/docs/API.md#formatdate),
12-
[formatTime](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-framework/docs/API.md#formattime), and
13-
[formatDatetime](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-framework/docs/API.md#formatdatetime)
11+
[formatDate](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-framework/docs/API.md#formatdate),
12+
[formatTime](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-framework/docs/API.md#formattime), and
13+
[formatDatetime](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-framework/docs/API.md#formatdatetime)
1414
functions. These functions format dates in ways that are both adaptable
1515
(using the `mode` parameter) and localized according to the user's locale.
1616

@@ -28,7 +28,7 @@ formatted into ISO-8601 format.
2828

2929
The ISO-8601 date strings sent by the server can be parsed into Javascript
3030
`Date` objects using the
31-
[parseDate](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-framework/docs/API.md#parsedate)
31+
[parseDate](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-framework/docs/API.md#parsedate)
3232
function. This uses [dayjs](https://day.js.org/docs/en/parse/string) for
3333
parsing.
3434

docs/main/extensions.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Read the above two lines until they resonate in your head like a mantra.
2424
Extensions get rendered into slots. An extension gets associated with a
2525
slot in one of the following ways:
2626
- The extension names the slot in its definition, under `slot[s]`
27-
- A call to [attach](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-framework/docs/API.md#attach)
27+
- A call to [attach](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-framework/docs/API.md#attach)
2828
- A system administrator adds the extension to the slot using the
2929
slot's `add` array
3030

@@ -58,10 +58,10 @@ Extensions are defined in the `setupOpenMRS` function of a module, in an
5858
`extensions` array. Each element of this array defines an extension, with
5959
a name and a load function. It may also specify the names of slots to
6060
attach the extension to by default. It may also specify
61-
[a number of other things](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-framework/docs/interfaces/ExtensionDefinition.md),
61+
[a number of other things](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-framework/docs/interfaces/ExtensionDefinition.md),
6262
some of which will be covered below.
6363

64-
Slots are components. There is an [ExtensionSlot](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-framework/docs/API.md#extensionslot)
64+
Slots are components. There is an [ExtensionSlot](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-framework/docs/API.md#extensionslot)
6565
React component. If you are working in a different framework and would like to create
6666
an extension slot, please get in touch with the OpenMRS Frontend 3.0 team
6767
on Slack.
@@ -153,7 +153,7 @@ information.
153153
State is provided as a parameter to the `ExtensionSlot` or `Extension`
154154
components, and recieved as a prop by the extension.
155155

156-
See the [ExtensionSlot API docs](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-framework/docs/API.md#extensionslot)
156+
See the [ExtensionSlot API docs](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-framework/docs/API.md#extensionslot)
157157
for more.
158158

159159
## Meta
@@ -168,7 +168,7 @@ Meta is provided by extensions in their definition in the `setupOpenMRS`
168168
function.
169169

170170
Slots can access meta through the extension system API, such as by using
171-
[useExtensionSlotMeta](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-framework/docs/API.md#useextensionslotmeta).
171+
[useExtensionSlotMeta](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-framework/docs/API.md#useextensionslotmeta).
172172

173173
## Offline Support
174174

docs/main/state.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ This can come up, for example, if you your frontend module has multiple extensio
1313
that need to share state with each other.
1414

1515
In these cases you can use the
16-
[`@openmrs/esm-state`](https://github.com/openmrs/openmrs-esm-core/tree/master/packages/framework/esm-state)
16+
[`@openmrs/esm-state`](https://github.com/openmrs/openmrs-esm-core/tree/main/packages/framework/esm-state)
1717
features of `@openmrs/esm-framework`. The framework provides functions for
1818
managing state using [Unistore](https://github.com/developit/unistore#unistore).
1919

2020
## How do I use it?
2121

2222
A Unistore store can be created using
23-
[`createGlobalStore`](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-framework/docs/API.md#createglobalstore):
23+
[`createGlobalStore`](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-framework/docs/API.md#createglobalstore):
2424

2525
```typescript
2626
import { createGlobalStore } from '@openmrs/esm-framework';
@@ -35,7 +35,7 @@ createGlobalStore("books", {
3535
```
3636

3737
The store can then be accessed using
38-
[`getGlobalStore`](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-framework/docs/API.md#getglobalstore)
38+
[`getGlobalStore`](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-framework/docs/API.md#getglobalstore)
3939

4040
```typescript
4141
import { getGlobalStore } from '@openmrs/esm-framework';

docs/under_the_hood/architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Once the UI is rendered the content is exclusively coming from the different fro
2424
Frontend modules use [dynamic imports](https://webpack.js.org/guides/code-splitting/)
2525
to split into a "front bundle" and content bundles.
2626
The front bundle begins at the entry point, which the
27-
[webpack config](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/tooling/openmrs/default-webpack-config.js)
27+
[webpack config](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/tooling/openmrs/default-webpack-config.js)
2828
takes from the
2929
[main entry of package.json](https://github.com/openmrs/openmrs-esm-template-app/blob/69b0f7a3ef3e79e9851fc0621e8b6c8311e7e6d7/package.json#L7)
3030
and which is usually `src/index.ts`. This bundle should be small and not contain much

docs/under_the_hood/squad_devops.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Squad DevOps and CI
22

33
The CI server at dev3.openmrs.org is a community resource, hosted on the OpenMRS infrastructure, though the actual ESMs are stored in a Digital Ocean space kindly provided by AMPATH. Every time a commit is made to
4-
`master` in a community-managed frontend module repository, GitHub Actions
4+
`main` in a community-managed frontend module repository, GitHub Actions
55
deploys the built package to Digital Ocean and updates the importmap so that the CI server always runs the latest version of all modules.
66

7-
Every time a GitHub release is created in a community-managed frontend module repository, GitHub Actions releases a new NPM package for each frontend module (tag: "latest"). The difference to an ordinary commit to `master` is that these only create preview packages (tag: "next").
7+
Every time a GitHub release is created in a community-managed frontend module repository, GitHub Actions releases a new NPM package for each frontend module (tag: "latest"). The difference to an ordinary commit to `main` is that these only create preview packages (tag: "next").
88

99
[OpenMRS Bamboo](https://ci.openmrs.org/allPlans.action) is used only for
1010
[openmrs-module-spa](https://github.com/openmrs/openmrs-module-spa/). Its jobs

0 commit comments

Comments
 (0)