Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@2.0.0/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
5 changes: 5 additions & 0 deletions .changeset/empty-parents-enjoy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@eresearchqut/form-components': minor
---

Use webpack 5 for story components
11 changes: 11 additions & 0 deletions .changeset/shiny-turtles-vanish.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
'@eresearchqut/form-compiler': minor
'@eresearchqut/form-components': minor
'@eresearchqut/form-definition': minor
'@eresearchqut/form-designer': minor
'@eresearchqut/tenant-resource-manager': minor
'@eresearchqut/user-management-api': minor
'@eresearchqut/user-management-components': minor
---

Switched the monorepo build system from lerna to turborepo and release system from lerna to changesets
18 changes: 2 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Build and Publish
name: Build
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -14,20 +12,8 @@ jobs:
with:
node-version: '16'
registry-url: 'https://npm.pkg.github.com'
cache: 'yarn'
- name: Configure Git User
run: |
git config --global user.email "eresearch@qut.edu.au"
git config --global user.name "@$GITHUB_ACTOR"
- name: Configure NPMRC
uses: ferluisxd/create-npmrc@3
env:
AUTH_TOKEN: ${{ secrets.NPM_GITHUB_TOKEN }}
with:
org_name: eresearchqut
- name: Build Package
run: |
yarn install
yarn build
yarn test
yarn lerna publish minor --no-changelog --conventional-commits --yes
yarn test
49 changes: 49 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Release

on:
push:
branches:
- main

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- name: Configure Git User
run: |
git config --global user.email "eresearch@qut.edu.au"
git config --global user.name "@$GITHUB_ACTOR"

- name: Configure NPMRC
uses: ferluisxd/create-npmrc@3
env:
AUTH_TOKEN: ${{ secrets.NPM_GITHUB_TOKEN }}
with:
org_name: eresearchqut

- name: Setup Node.js 16.x
uses: actions/setup-node@v2
with:
node-version: 16.x

- name: Install Dependencies
run: yarn

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_GITHUB_TOKEN }}

3 changes: 1 addition & 2 deletions .github/workflows/storybook-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ jobs:
with:
node-version: '16'
registry-url: 'https://npm.pkg.github.com'
cache: 'yarn'
- name: Build Story Book
run: |
yarn install
yarn build
yarn storybook-build
yarn storybook:build
- name: Publish Story Book
uses: jakejarvis/s3-sync-action@master
with:
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,8 @@ storybook-static
# OSX DS_Store files
.DS_Store

# Turbo repo files
.turbo
build/**
dist/**
.next/**
7 changes: 5 additions & 2 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
module.exports = {
core: {
builder: "webpack5",
},
stories: ['../packages/**/src/**/*.story.mdx', '../packages/**/src/**/*.story.@(js|jsx|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'storybook-stylesheet-toggle',
'@storybook/preset-scss',
],
'@storybook/preset-scss'
]
};
33 changes: 16 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,20 @@

Repository of future state modules. This repository will be renamed at some point.

## Build instructions
## Dependencies

* [Node 16](https://nodejs.org/en/download/)
* [Yarn](https://yarnpkg.com/getting-started/install)

## Useful commands

```
yarn prepare
yarn build
yarn install - Initialise the workspace
yarn build - Build all packages
yarn lint - Lint all packages
yarn changeset - Generate a changeset
yarn clean - Clean up all node_modules and dist folders (runs each package's clean script)
yarn storybook - Start the storybook
```

## Modules
Expand All @@ -21,20 +30,10 @@ yarn build
| Form Designer | Drag and Drop form designer that utilises the form-compiler and form-component packages |


## Storybook

To start the storybook

```
yarn storybook
```

### Node 17+ failure

If you are running Node 17+ on Linux, you might get an `ERR_OSSL_EVP_UNSUPPORTED` error when running `yarn storybook`.
## Versioning and Publishing packages

The fix is to `export NODE_OPTIONS=--openssl-legacy-provider` before running `yarn storybook`.
Package publishing has been configured using [Changesets](https://github.com/changesets/changesets). Please review their [documentation](https://github.com/changesets/changesets#documentation) to familarize yourself with the workflow.

[StackOwerflow reference](https://stackoverflow.com/questions/69394632/webpack-build-failing-with-err-ossl-evp-unsupported)
On push to the main branch the [Release](.github/workflows/release.yml) [GitHub Action](https://github.com/changesets/action)

_Note: remove this sections if this gets fixed later_
For more information about this automation, refer to the official [changesets documentation](https://github.com/changesets/changesets/blob/main/docs/automating-changesets.md)
25 changes: 0 additions & 25 deletions jest.config.js

This file was deleted.

16 changes: 0 additions & 16 deletions lerna.json

This file was deleted.

42 changes: 22 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,42 +17,44 @@
"directory": "@eresearchqut/future-state-mono-repo"
},
"scripts": {
"prepare": "lerna bootstrap --use-workspaces",
"clean": "lerna run clean --stream",
"build": "lerna run build --stream",
"test": "lerna run test --stream",
"depcheck": "lerna run depcheck --stream",
"lint": "lerna run lint --stream --parallel",
"test": "lerna run test --stream",
"publish": "lerna publish",
"clean": "turbo run clean && rimraf storybook-static && rimraf node_modules",
"build": "yarn turbo run build",
"build:no-cache": "turbo run build --no-cache --parallel --continue",
"lint": "yarn turbo run lint",
"storybook": "start-storybook",
"storybook-build": "build-storybook"
"storybook:build": "build-storybook",
"test": "yarn turbo run test",
"changeset": "changeset",
"version-packages": "changeset version",
"release": "turbo run build --filter=docs^... && changeset publish"
},
"devDependencies": {
"@types/jest": "26.0.24",
"@typescript-eslint/eslint-plugin": "4.31.1",
"@typescript-eslint/parser": "4.31.1",
"@storybook/storybook-deployer": "^2.8.11",
"@changesets/cli": "^2.22.0",
"@storybook/addon-actions": "6.4.22",
"@storybook/addon-essentials": "6.4.22",
"@storybook/addon-links": "6.4.22",
"@storybook/builder-webpack5": "6.4.22",
"@storybook/manager-webpack5": "6.4.22",
"@storybook/preset-scss": "^1.0.3",
"@storybook/react": "6.4.22",
"depcheck": "^1.4.3",
"@types/jest": "26.0.24",
"@typescript-eslint/eslint-plugin": "4.31.1",
"@typescript-eslint/parser": "4.31.1",
"eslint": "7.32.0",
"eslint-config-eslint": "7.0.0",
"eslint-config-google": "0.14.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-react": "7.25.2",
"eslint-plugin-react-hooks": "4.2.0",
"storybook-stylesheet-toggle": "^0.1.3",
"primereact": "8.0.0",
"is-ci": "3.0.0",
"jest": "26.6.0",
"lerna": "4.0.0",
"prettier": "2.6.2",
"primereact": "8.0.1",
"rimraf": "3.0.2",
"sass-loader": "10.2.1",
"storybook-stylesheet-toggle": "^0.1.3",
"ts-jest": "26.5.5",
"typescript": "4.3.5"
"turbo": "^1.2.9",
"typescript": "4.3.5",
"webpack": "^5.72.1"
}
}
}
8 changes: 4 additions & 4 deletions packages/form-compiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
"registry": "https://npm.pkg.github.com/"
},
"scripts": {
"clean": "rimraf dist && rimraf tsconfig.tsbuildinfo",
"clean": "rimraf dist && rimraf node_modules && rimraf .turbo && rimraf tsconfig.tsbuildinfo",
"prepack": "yarn build",
"build": "yarn clean && tsc --build && cp \"./package.json\" ./dist/",
"build": "tsc --build && copyfiles package.json dist/",
"test": "jest --no-cache",
"test-cov": "jest --no-cache --coverage",
"lint": "eslint \"./src/**/*.{ts,tsx}\" --max-warnings=0 --fix"
},
"dependencies": {
"@eresearchqut/form-definition": "^0.31.0",
"@jsonforms/core": "^3.0.0-alpha.3",
"@eresearchqut/form-definition": "*",
"@jsonforms/core": "^3.0.0-beta.2",
"lodash": "^4.14.171"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions packages/form-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
"registry": "https://npm.pkg.github.com/"
},
"scripts": {
"clean": "rimraf dist && rimraf tsconfig.tsbuildinfo",
"clean": "rimraf dist && rimraf node_modules && rimraf .turbo && rimraf tsconfig.tsbuildinfo",
"copy-files": "copyfiles -u 1 \"src/**/*.scss\" dist/ && copyfiles -u 1 \"src/**/*.svg\" dist/ && copyfiles package.json dist/",
"prepack": "yarn build",
"svgson": "svgson src/component/SvgMap/svgs --output src/component/SvgMap/maps/svgs",
"build": "yarn clean && yarn svgson && tsc --build && yarn copy-files",
"build": "yarn svgson && tsc --build && yarn copy-files",
"test": "jest --no-cache",
"test-cov": "jest --no-cache --coverage",
"lint": "eslint \"./src/**/*.{ts,tsx}\" --fix --max-warnings=0"
Expand All @@ -30,7 +30,7 @@
"lodash": "4.17.21",
"primeflex": "2.0.0",
"primeicons": "5.0.0",
"primereact": "8.0.0",
"primereact": "8.0.1",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-img-mapper": "1.2.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/form-definition/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
"registry": "https://npm.pkg.github.com/"
},
"scripts": {
"clean": "rimraf dist && rimraf tsconfig.tsbuildinfo",
"clean": "rimraf dist && rimraf node_modules && rimraf .turbo && rimraf tsconfig.tsbuildinfo",
"prepack": "yarn build",
"schema": "typescript-json-schema ./tsconfig.json --required Form --out ./src/schema/form.json && typescript-json-schema ./tsconfig.json --required Section --out ./src/schema/section.json && typescript-json-schema ./tsconfig.json --required Input --out ./src/schema/input.json",
"build": "yarn clean && tsc --build && yarn schema && cp \"./package.json\" ./dist/",
"build": "tsc --build && yarn schema && copyfiles package.json dist/",
"test": "echo 'notest'",
"lint": "eslint \"./src/**/*.{ts,tsx}\" --max-warnings=0 --fix"
},
Expand Down
Loading