@moduk/frontend 0.2.1-alpha.6 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moduk/frontend",
3
- "version": "0.2.1-alpha.6",
3
+ "version": "0.2.2",
4
4
  "description": "The MOD.UK Frontend contains the code you need to start building a user interface for Ministry of Defence platforms and services.",
5
5
  "main": "dist/lib/index.js",
6
6
  "sass": "src/css/index.scss",
@@ -27,7 +27,10 @@
27
27
  "build": "npm run build:assets && npm run build:css && npm run build:lib && npm run build:client",
28
28
  "prebuild:assets": "shx rm -rf dist/assets",
29
29
  "build:assets": "ts-node scripts/copy-govuk-static-assets.ts",
30
- "build:client": "vite build && tsc --project src/client",
30
+ "prebuild:client": "shx rm -rf dist/client",
31
+ "build:client": "npm run build:client:umd && npm run build:client:es && tsc --project src/client",
32
+ "build:client:umd": "webpack --config webpack.config.ts",
33
+ "build:client:es": "babel src/client/index.ts --extensions .ts,.tsx --out-file dist/client/moduk-frontend.mjs",
31
34
  "prebuild:css": "shx rm -rf dist/css",
32
35
  "build:css": "sass --load-path=node_modules --quiet-deps --style compressed src/css/index.scss | postcss -o dist/css/index.css",
33
36
  "prebuild:lib": "shx rm -rf dist/lib",
@@ -52,8 +55,7 @@
52
55
  "test:visual:refresh": "scripts/run-playwright-container.sh bash -c 'npm install && npm run test:visual:native -- --update-snapshots'",
53
56
  "test:watch": "vitest",
54
57
  "prepare": "husky install",
55
- "release:alpha": "release-it --preRelease=alpha",
56
- "release:stable": "release-it --github.draft"
58
+ "release": "release-it"
57
59
  },
58
60
  "repository": {
59
61
  "type": "git",
@@ -79,11 +81,15 @@
79
81
  "devDependencies": {
80
82
  "@11ty/eleventy": "^1.0.2",
81
83
  "@axe-core/playwright": "^4.5.2",
84
+ "@babel/cli": "^7.20.7",
85
+ "@babel/core": "^7.20.12",
86
+ "@babel/preset-env": "^7.20.2",
87
+ "@babel/preset-typescript": "^7.18.6",
82
88
  "@commitlint/cli": "^17.3.0",
83
89
  "@commitlint/config-conventional": "^17.3.0",
84
- "@playwright/test": "^1.29.1",
90
+ "@playwright/test": "^1.29.2",
85
91
  "@release-it/conventional-changelog": "^5.1.1",
86
- "@testing-library/dom": "^8.19.0",
92
+ "@testing-library/dom": "^8.19.1",
87
93
  "@testing-library/jest-dom": "^5.16.5",
88
94
  "@types/glob": "^8.0.0",
89
95
  "@types/lodash": "^4.14.189",
@@ -91,6 +97,7 @@
91
97
  "@typescript-eslint/eslint-plugin": "^5.46.1",
92
98
  "@typescript-eslint/parser": "^5.46.1",
93
99
  "autoprefixer": "^10.4.13",
100
+ "babel-loader": "^9.1.2",
94
101
  "dprint": "^0.34.1",
95
102
  "eslint": "^8.29.0",
96
103
  "eslint-config-airbnb-base": "^15.0.0",
@@ -98,7 +105,7 @@
98
105
  "eslint-plugin-import": "^2.26.0",
99
106
  "eslint-plugin-unicorn": "^45.0.1",
100
107
  "glob": "^8.0.3",
101
- "happy-dom": "^8.1.0",
108
+ "happy-dom": "^8.1.3",
102
109
  "husky": "^8.0.2",
103
110
  "lint-staged": "^13.1.0",
104
111
  "postcss-cli": "^10.1.0",
@@ -108,26 +115,30 @@
108
115
  "shx": "^0.3.4",
109
116
  "ts-node": "^10.9.1",
110
117
  "typescript": "^4.9.3",
111
- "vite": "^3.2.4",
112
- "vitest": "^0.25.8"
118
+ "vitest": "^0.27.0",
119
+ "webpack": "^5.75.0",
120
+ "webpack-cli": "^5.0.1"
113
121
  },
114
122
  "lint-staged": {
115
- "*.{js,jsx,ts,tsx}": [
116
- "eslint --max-warnings 0",
117
- "dprint fmt"
123
+ "*.{cjs,js,jsx,mjs,mts,ts,tsx}": [
124
+ "dprint fmt",
125
+ "eslint --max-warnings 0"
118
126
  ],
119
- "*.{md,yaml,yml}": [
127
+ "*.{md,scss,yaml,yml}": [
120
128
  "dprint fmt"
121
129
  ]
122
130
  },
123
131
  "overrides": {
132
+ "@axe-core/playwright": {
133
+ "playwright": "$@playwright/test"
134
+ },
124
135
  "liquidjs": "^10.4.0"
125
136
  },
126
137
  "dependencies": {
127
138
  "lodash": "^4.17.21"
128
139
  },
129
140
  "peerDependencies": {
130
- "govuk-frontend": "^4.4.1",
141
+ "govuk-frontend": "4.4.1",
131
142
  "nunjucks": "^3.2.3"
132
143
  },
133
144
  "publishConfig": {