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

Update to Lit2.0, TS support, issue templates, component registration extension #167

Closed
blackfalcon opened this issue May 4, 2023 · 0 comments · Fixed by #170
Closed
Assignees
Labels
auro-hyperlink Status: Work In Progress Issue or Pull Request work is in Progress

Comments

@blackfalcon
Copy link
Member

blackfalcon commented May 4, 2023

Is your feature request related to a problem? Please describe.

The badge element is built using Lit1.0 and related dependencies. The element does not support typescript users. Issue templates and github settings in this repo are outdated. The current badge element is well behind recent versions of core support functions.

This repo does not support TS users.

This repo's issue templates are out of date.

This repo does not support component extension.

Describe the solution you'd like

Update to Lit2.0

Using a Node 18 environment, update all other dependencies. This may include deleting and rebuilding the package-lock.json file and node_modules/ directory then running npm run i to recreate all resources.

Update component registration

Update the following core features of the badge element

  1. Remove the element definition from the element .js file and place into index.js file
  2. Update rollup dependencies and configs to support the new import model

Huskey 8

The following outlines the steps needed for updating any repo to the latest version of Husky.

  1. npx husky-init
  2. npm i @open-wc/testing@latest @web/test-runner@latest @web/dev-server@latest --save-dev
  3. npm run prepare
  4. chmod ug+x .husky/*
  5. chmod ug+x .git/hooks/*
  6. Update package.json - "test": "wtr --coverage", and "test:watch": "wtr --watch",
  7. Add web-test-runner.config.mjs
  8. Update .husky/pre-commit and necessary pre-commit actions
  9. Delete legacy Husky configs from package.json
  10. Delete karma.conf.js file
  11. Uninstall @open-wc/testing-karma

Update typescript support

Update the repo to support typescript. The solution is to use the typescript npm package, add a types npm build script and create a tsconfig.json file.

tsconfig.json example

{
  "include": ["src/**/*.js"], // process the generated JS files from the src js files 
  "exclude": [],
  "compilerOptions": {
    // Tells TypeScript to read JS files, as
    // normally they are ignored as source files
    "allowJs": true,
    // Generate d.ts files
    "declaration": true,
    // This compiler run should
    // only output d.ts files
    "emitDeclarationOnly": true,
    "outDir": "dist",
    // go to js file when using IDE functions like
    // "Go to Definition" in VSCode
    "declarationMap": true
  }
}

Update the repo's ISSUE TEMPLATES and add CODEOWNER file

  1. update: .github/ISSUE_TEMPLATE/bug_report.md
  2. update: .github/ISSUE_TEMPLATE/feature_request.md
  3. update: .github/ISSUE_TEMPLATE/general-support.md
  4. update: .github/settings.yml
  5. delete: .github/ISSUE_TEMPLATE/develop-design-story.md
  6. delete: .github/ISSUE_TEMPLATE/audit.md
  7. delete: .github/ISSUE_TEMPLATE/new_wc.md
  8. delete: .github/ISSUE_TEMPLATE/parent-design-story.md
  9. delete: .github/ISSUE_TEMPLATE/review-design-story.md
  10. delete: .github/ISSUE_TEMPLATE/symbol-design-story.md
  11. delete: .github/ISSUE_TEMPLATE/user-story.md
  12. new file: .github/CODEOWNERS

When reviewing code from the previous issue commit, be sure to include this commit as well.
AlaskaAirlines/auro-badge@fdaddcc

Update to support Node 18

https://github.com/AlaskaAirlines/auro-flight/blob/50854e9213f571c6137303fa466a7ea9a3df944a/package.json#L18-L20

https://github.com/AlaskaAirlines/auro-flight/blob/50854e9213f571c6137303fa466a7ea9a3df944a/.github/workflows/testPublish.yml#L18

https://github.com/AlaskaAirlines/auro-flight/blob/50854e9213f571c6137303fa466a7ea9a3df944a/.github/workflows/testPublish.yml#L40

Dart Sass

Update project and npm scripts to use the latest version of Dart Sass

Single CLI

Allow users to use a single CLI instance for development

Update to use Chalk 5

Update package and postinstall to support Chalk 5+

@AuroDesignSystem

Update any current dependency and code resources to support any new element published to the @aurodesignsystem namespace.

Exit criteria

This issue will be considered closed once the repo is updated to Lit2.0 and all features and tests operate as expected with all other dependencies updated as well.

This issue can be closed once a .d.ts file is created with the build.

This issue can be closed once the issue templates match the content from the generator repo.

This issue will not be considered complete once the listed core features are updated along with all associated dependencies and all features work as previously expected with node 18 installed.

@blackfalcon blackfalcon added the Status: Work In Progress Issue or Pull Request work is in Progress label May 4, 2023
@blackfalcon blackfalcon transferred this issue from AlaskaAirlines/auro-flight May 4, 2023
@blackfalcon blackfalcon added auro-hyperlink Type: perf and removed Status: Work In Progress Issue or Pull Request work is in Progress labels May 4, 2023
@blackfalcon blackfalcon added this to the Node 18+ support milestone May 4, 2023
@irma-kurnia-alaska irma-kurnia-alaska added the Status: Work In Progress Issue or Pull Request work is in Progress label May 8, 2023
irma-kurnia-alaska pushed a commit that referenced this issue May 8, 2023
…ration extension #167

Change to be committed:
modified: .npmignore
modified: .stylelintrc
modified: package-lock.json
modified: package.json
modified: README.md
new file: tsconfig.json
modified: .github/settings.yml
deleted: .github/ISSUE_TEMPLATE/bug_report.md
new file: .github/ISSUE_TEMPLATE/bug_report.yml
deleted: .github/ISSUE_TEMPLATE/feature_request.md
new file: .github/ISSUE_TEMPLATE/feature_request.yml
deleted: .github/ISSUE_TEMPLATE/general-support.md
new file: .github/ISSUE_TEMPLATE/general-support.yml
modified: .husky/pre-commit
modified: demo/index.html
modified: scripts/postCss.js
deleted: scripts/removeNonRemPlugin.js
modified: src/auro-hyperlink.js
deleted: src/style-fixed.scss
@irma-kurnia-alaska irma-kurnia-alaska linked a pull request May 8, 2023 that will close this issue
3 tasks
blackfalcon pushed a commit that referenced this issue Jun 29, 2023
…ration extension #167

Change to be committed:
modified: .npmignore
modified: .stylelintrc
modified: package-lock.json
modified: package.json
modified: README.md
new file: tsconfig.json
modified: .github/settings.yml
deleted: .github/ISSUE_TEMPLATE/bug_report.md
new file: .github/ISSUE_TEMPLATE/bug_report.yml
deleted: .github/ISSUE_TEMPLATE/feature_request.md
new file: .github/ISSUE_TEMPLATE/feature_request.yml
deleted: .github/ISSUE_TEMPLATE/general-support.md
new file: .github/ISSUE_TEMPLATE/general-support.yml
modified: .husky/pre-commit
modified: demo/index.html
modified: scripts/postCss.js
deleted: scripts/removeNonRemPlugin.js
modified: src/auro-hyperlink.js
deleted: src/style-fixed.scss
blackfalcon pushed a commit that referenced this issue Aug 18, 2023
…ration extension #167

Change to be committed:
modified: .npmignore
modified: .stylelintrc
modified: package-lock.json
modified: package.json
modified: README.md
new file: tsconfig.json
modified: .github/settings.yml
deleted: .github/ISSUE_TEMPLATE/bug_report.md
new file: .github/ISSUE_TEMPLATE/bug_report.yml
deleted: .github/ISSUE_TEMPLATE/feature_request.md
new file: .github/ISSUE_TEMPLATE/feature_request.yml
deleted: .github/ISSUE_TEMPLATE/general-support.md
new file: .github/ISSUE_TEMPLATE/general-support.yml
modified: .husky/pre-commit
modified: demo/index.html
modified: scripts/postCss.js
deleted: scripts/removeNonRemPlugin.js
modified: src/auro-hyperlink.js
deleted: src/style-fixed.scss
blackfalcon pushed a commit that referenced this issue Aug 18, 2023
## [3.3.4](v3.3.3...v3.3.4) (2023-08-18)

### Bug Fixes

* general feedback review ([e8aa95f](e8aa95f))
* re-add docTemplates/ to .gitignore per [#171](#171) ([fcf143a](fcf143a))

### Performance Improvements

* **es5:** Remove legacy es5 bundling resources [#166](#166) ([34a1a69](34a1a69))
* general update to complete update node 18 ([4350122](4350122))
* **node18:** update repo to support Node 18+ [#168](#168) ([8e8b3bb](8e8b3bb))
* remove unused script ([40d2386](40d2386))
* update general dependencies node 18 ([f12886d](f12886d))
* update npm script, remove files ([d7ef58f](d7ef58f))
* update to Lit2.0, TS support, issue templates, component registration extension [#167](#167) ([ca387bc](ca387bc))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auro-hyperlink Status: Work In Progress Issue or Pull Request work is in Progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants