Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: revert bad changes #3103

Merged
merged 1 commit into from
Jan 15, 2025
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
138 changes: 12 additions & 126 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,73 +47,15 @@ jobs:
- name: Git
run: npm run test:git

build-pack:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
package:
[
atoms,
core,
core-util,
dashboard,
doc-site,
helpers,
react-components,
scene-composer,
source-iotsitewise,
source-iottwinmaker,
tools-iottwinmaker,
]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
cache-dependency-path: '**/package-lock.json'

- name: node_modules cache
id: npm-cache
uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.os }}-node_modules-${{hashFiles('**/package-lock.json')}}
restore-keys: |
${{ runner.os }}-node_modules-

- name: Install
if: steps.npm-cache.outputs.cache-hit != 'true'
shell: bash
env:
NODE_OPTIONS: '--max_old_space_size=8192'
run: npm ci --prefer-offline --no-audit --progress=false --workspaces --include-workspace-root

- name: Turbo cache
uses: actions/cache@v4
with:
path: '.turbo'
key: ${{ runner.os }}-turbo-build-pack-${{ matrix.package}}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-build-pack-${{ matrix.package}}-

- name: Validate
run: npx turbo build pack -F @iot-app-kit/${{ matrix.package }}

lint:
unit:
needs: repo
runs-on: ubuntu-latest
timeout-minutes: 10
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
package:
[
atoms,
core,
core-util,
dashboard,
Expand All @@ -125,9 +67,7 @@ jobs:
scene-composer,
source-iotsitewise,
source-iottwinmaker,
testing-util,
tools-iottwinmaker,
vite-config,
]
steps:
- name: Checkout
Expand Down Expand Up @@ -160,79 +100,25 @@ jobs:
uses: actions/cache@v4
with:
path: '.turbo'
key: ${{ runner.os }}-turbo-lint-${{ matrix.package}}-${{ github.sha }}
key: ${{ runner.os }}-turbo-unit-${{ matrix.package}}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-lint-${{ matrix.package}}-
${{ runner.os }}-turbo-unit-${{ matrix.package}}-

- name: Lint cache
- name: Test and lint cache
uses: actions/cache@v4
with:
path: '**/.cache'
key: ${{ runner.os }}-lint-${{ matrix.package}}-${{ github.sha }}
key: ${{ runner.os }}-test-lint-${{ matrix.package}}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-lint-${{ matrix.package}}-
${{ runner.os }}-test-lint-${{ matrix.package}}-

- name: Validate
run: npx turbo lint -F @iot-app-kit/${{ matrix.package }}

unit:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
package:
[
core,
core-util,
dashboard,
react-components,
scene-composer,
source-iotsitewise,
source-iottwinmaker,
tools-iottwinmaker,
]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
cache-dependency-path: '**/package-lock.json'

- name: node_modules cache
id: npm-cache
uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.os }}-node_modules-${{hashFiles('**/package-lock.json')}}
restore-keys: |
${{ runner.os }}-node_modules-

- name: Install
if: steps.npm-cache.outputs.cache-hit != 'true'
shell: bash
env:
NODE_OPTIONS: '--max_old_space_size=8192'
run: npm ci --prefer-offline --no-audit --progress=false --workspaces --include-workspace-root

- name: Turbo cache
uses: actions/cache@v4
with:
path: '.turbo'
key: ${{ runner.os }}-turbo-unit-${{ matrix.package}}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-unit-${{ matrix.package}}-

- name: Validate
run: npx turbo test -F @iot-app-kit/${{ matrix.package }}
run: npx turbo build:cjs build:es lint test --filter=@iot-app-kit/${{ matrix.package }}

playwright:
needs: repo
runs-on: ubuntu-latest
timeout-minutes: 10
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -303,7 +189,7 @@ jobs:

- name: Playwright
run: |
npx turbo test:ui:ci -F @iot-app-kit/${{ matrix.package.name }} -- --shard=${{ matrix.package.shardIndex }}/${{ matrix.package.totalShards }}
npx turbo test:ui:ci --filter=@iot-app-kit/${{ matrix.package.name }} -- --shard=${{ matrix.package.shardIndex }}/${{ matrix.package.totalShards }}

- name: Test report
id: upload-test-report
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ npm-debug.log
*.sublime-project
*.sublime-workspace
*.docx
*.tgz

.idea/
.vscode/
Expand Down
26 changes: 13 additions & 13 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"packages/core": "12.3.0",
"packages/dashboard": "12.3.0",
"apps/doc-site": "12.3.0",
"packages/core-util": "12.3.0",
"packages/react-components": "12.3.0",
"packages/scene-composer": "12.3.0",
"packages/source-iotsitewise": "12.3.0",
"packages/source-iottwinmaker": "12.3.0",
".": "12.3.0",
"packages/testing-util": "12.3.0",
"packages/tools-iottwinmaker": "12.3.0",
"configuration/ts-config": "12.3.0",
"configuration/eslint-config": "12.3.0"
"packages/core": "12.2.1",
"packages/dashboard": "12.2.1",
"apps/doc-site": "12.2.1",
"packages/core-util": "12.2.1",
"packages/react-components": "12.2.1",
"packages/scene-composer": "12.2.1",
"packages/source-iotsitewise": "12.2.1",
"packages/source-iottwinmaker": "12.2.1",
".": "12.2.1",
"packages/testing-util": "12.2.1",
"packages/tools-iottwinmaker": "12.2.1",
"configuration/ts-config": "12.2.1",
"configuration/eslint-config": "12.2.1"
}
11 changes: 11 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
build/
dist/
www/
loader/
node_modules/
examples/
**/coverage/*
coverage/
packages/dashboard/src/components/internalDashboard/index.css
packages/react-components/styles.css
storybook-static
18 changes: 0 additions & 18 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,6 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [12.3.0](https://github.com/awslabs/iot-app-kit/compare/root-v12.2.1...root-v12.3.0) (2025-01-15)


### Features

* add support for null / nan ([d6fc241](https://github.com/awslabs/iot-app-kit/commit/d6fc241df1f9b2a07196bd9c1981a8ed513d89ce))


### Bug Fixes

* 3rd-party imports during build ([d993ad5](https://github.com/awslabs/iot-app-kit/commit/d993ad569e579dd6f85850e5197f1350d48c718b))
* clean script and dependency task management ([52bfc4c](https://github.com/awslabs/iot-app-kit/commit/52bfc4c4602387d0eb9c8f4f30d0103ae42ac517))
* ensure protected packages do not have devDeps on pack ([fee90d3](https://github.com/awslabs/iot-app-kit/commit/fee90d37de7d2797564193ea877c8162b1cc8a63))
* optional property check for error metadata ([1a2b661](https://github.com/awslabs/iot-app-kit/commit/1a2b66167e758b1eede4914bcf9a22b06c915e46))
* packages ([613ab59](https://github.com/awslabs/iot-app-kit/commit/613ab59818934387edb255adf685356fc855d458))
* remove orange button ([6f15fc3](https://github.com/awslabs/iot-app-kit/commit/6f15fc3dcd013e54217c9082b2c8a114c3eca761))
* update hover states and alarm colors ([ef89eff](https://github.com/awslabs/iot-app-kit/commit/ef89eff222c65be33ca673aeee760fe6c7aff1ea))

## [12.2.1](https://github.com/awslabs/iot-app-kit/compare/root-v12.2.0...root-v12.2.1) (2024-12-03)


Expand Down
2 changes: 0 additions & 2 deletions apps/dev-env/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
node_modules
storybook-static
.turbo
.cache
24 changes: 1 addition & 23 deletions apps/dev-env/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,26 +1,4 @@
const base = require('@iot-app-kit/eslint-config');

// The pattern of manual merging is repeated in the .eslintrc.cjs files across
// the repo. Since we are using lodash-es, merge cannot be imported in this CJS
// file.

// TODO: Replace manual merging in ESLint config files. Consider migration to
// the latest ESLint which uses ESM.

module.exports = {
...base,
root: true,
settings: {
...base.settings,
'import/resolver': {
...base.settings['import/resolver'],
typescript: {
...base.settings['import/resolver'].typescript,
project: ['apps/dev-env/tsconfig.json'],
},
node: {
project: ['apps/dev-env/tsconfig.json'],
},
},
},
extends: ['iot-app-kit'],
};
13 changes: 5 additions & 8 deletions apps/dev-env/package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
{
"name": "@iot-app-kit/dev-env",
"version": "12.2.1",
"private": true,
"type": "module",
"scripts": {
"start": "npm run dev",
"clean": "npx rimraf storybook-static .cache test-results playwright-report",
"clean:turbo": "npx rimraf .turbo",
"clean:nuke": "npm run clean && npm run clean:turbo && npx rimraf node_modules",
"dev": "NODE_OPTIONS='--import tsx/esm' storybook dev -p 6006",
"clean": "rimraf storybook-static .turbo .cache test-results playwright-report",
"clean:nuke": "npm run clean && rimraf node_modules",
"dev": "storybook dev -p 6006",
"lint": "eslint . --max-warnings=0 --cache --cache-location .cache/eslint/ & tsc --noEmit",
"fix": "eslint --fix . --cache --cache-location ./cache/eslint/",
"test:ui": "npx playwright test",
"test:ui:ci": "NODE_OPTIONS='-C @iot-app-kit/development' npx playwright test",
"test:ui:ci": "npx playwright test",
"test:ui:watch": "npx playwright test --ui"
},
"dependencies": {
Expand All @@ -24,9 +22,7 @@
"@iot-app-kit/core-util": "*",
"@iot-app-kit/dashboard": "*",
"@iot-app-kit/data-mocked": "*",
"@iot-app-kit/eslint-config": "*",
"@iot-app-kit/helpers": "*",
"@iot-app-kit/react-components": "*",
"@iot-app-kit/ts-config": "*",
"@playwright/test": "^1.48.2",
"@storybook/addon-essentials": "^8.4.5",
Expand All @@ -38,6 +34,7 @@
"@types/lodash-es": "^4.17.12",
"@types/node": "^18.16.18",
"@vitejs/plugin-react": "^4.3.3",
"eslint-config-iot-app-kit": "*",
"lodash-es": "^4.17.21",
"msw-storybook-addon": "^2.0.4",
"react": "^18.2.0",
Expand Down
5 changes: 4 additions & 1 deletion apps/dev-env/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { MINUTE_IN_MS, SECOND_IN_MS } from '@iot-app-kit/helpers';
import {
MINUTE_IN_MS,
SECOND_IN_MS,
} from '@iot-app-kit/helpers/constants/time';
import { defineConfig, devices } from '@playwright/test';

/**
Expand Down
2 changes: 2 additions & 0 deletions apps/dev-env/stories/dashboard/sitewise-dashboard.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,14 @@

export const Main: Story = {
render: (_story, { args }) => {
// eslint-disable-next-line react-hooks/rules-of-hooks

Check failure on line 66 in apps/dev-env/stories/dashboard/sitewise-dashboard.stories.tsx

View workflow job for this annotation

GitHub Actions / unit (dev-env)

Definition for rule 'react-hooks/rules-of-hooks' was not found
const [initialViewMode, setInitialViewMode] = useState<'preview' | 'edit'>(
'edit'
);

// on save not only updates local storage but forces the dashboard to reload given the updated config
// this is done to more realistically match the dashboard implementation in iot-application
// eslint-disable-next-line react-hooks/rules-of-hooks

Check failure on line 73 in apps/dev-env/stories/dashboard/sitewise-dashboard.stories.tsx

View workflow job for this annotation

GitHub Actions / unit (dev-env)

Definition for rule 'react-hooks/rules-of-hooks' was not found
const onSave = useCallback(
async (
dashboard: DashboardConfiguration,
Expand Down
2 changes: 1 addition & 1 deletion apps/dev-env/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "@iot-app-kit/ts-config/tsconfig.base.json",
"include": [".storybook", "stories", "msw", "e2e"],
"include": [".storybook", "stories", "msw"],
"compilerOptions": {
"types": ["vite/client"]
}
Expand Down
5 changes: 1 addition & 4 deletions apps/dev-env/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vite';

// https://vitejs.dev/config/
export default defineConfig({
resolve: {
conditions: ['@iot-app-kit/development'],
},
plugins: [react()],
});
6 changes: 0 additions & 6 deletions apps/doc-site/.eslintrc.cjs

This file was deleted.

4 changes: 4 additions & 0 deletions apps/doc-site/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
root: true,
extends: ['iot-app-kit'],
};
Loading
Loading