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

feat(PPDSC-2162): codemods setup package #222

Merged
merged 88 commits into from
Jul 13, 2022

Conversation

mutebg
Copy link
Contributor

@mutebg mutebg commented Jun 3, 2022

PPDSC-2162

What

Created a new folder for codemod, with its own package.json / scripts and make file
Created a CLI tool and added initial source code and simple transformer
Added all necessary configs to run tests, linting and prittier on the codemod package.
Update Circle CI config with new jobs and workflows

in order to test:

cd lib/codemods
npm link

go to a site folder and execute:

newskit-codemod update-token "./theme/**/*.+(ts|tsx|json)" 

you should have 3 files with renamed tokens

Keep in mind that for the development CLI took is newskit-codemod but once that's published to NPM it can be used as npx @newskit/codemod ....

I have done:

  • Written unit tests against changes
  • Written functional tests against the component and/or NewsKit site
  • Updated relevant documentation

I have tested manually:

  • The feature's functionality is working as expected on Chrome, Firefox, Safari and Edge
  • The screen reader reads and flows through the elements as expected.
  • There are no new errors in the browser console coming from this PR.
  • When visual test is not added, it renders correctly on different browsers and mobile viewports (Safari, Firefox, small mobile viewport, tablet)
  • The Playground feature is working as expected

Before:

After:

Who should review this PR:

How to test:

@github-actions github-actions bot added the feature This change contains a new feature label Jun 3, 2022
.circleci/config.yml Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
@mutebg mutebg marked this pull request as ready for review June 8, 2022 06:21
@mutebg mutebg added the ready for review Please assist in getting this reviewed label Jun 8, 2022
@mutebg mutebg requested review from Xin00163, Vanals and mstuartf July 8, 2022 13:24
Xin00163
Xin00163 previously approved these changes Jul 11, 2022
lib/codemod/README.md Outdated Show resolved Hide resolved
@Vanals
Copy link
Contributor

Vanals commented Jul 12, 2022

Should the merge checker be added as required later 🤔 ? or now if possible. I was curious to see if creates issue have a required job in an optional workflow

@Vanals
Copy link
Contributor

Vanals commented Jul 12, 2022

https://nidigitalsolutions.jira.com/wiki/spaces/NPP/pages/1334083669/Engineering+release+process Should points 3 4 and 5 be influenced if releasing codemod too? Point 4 likely?
I think would be good to ask feedbacks also from other devs around how we are changing the release process notes. And if is clear in the new release documentation

@Vanals
Copy link
Contributor

Vanals commented Jul 12, 2022

A part from those LGTM! We will just need to test the release :D

@mutebg
Copy link
Contributor Author

mutebg commented Jul 13, 2022

@mutebg
Copy link
Contributor Author

mutebg commented Jul 13, 2022

https://nidigitalsolutions.jira.com/wiki/spaces/NPP/pages/1334083669/Engineering+release+process Should points 3 4 and 5 be influenced if releasing codemod too? Point 4 likely? I think would be good to ask feedbacks also from other devs around how we are changing the release process notes. And if is clear in the new release documentation

IMO it should not influence 3 and 5; About 4 maybe, depends if we want to have separate release notes for the codemod, but IMO is not needed.

@mutebg mutebg requested review from Xin00163 and Vanals July 13, 2022 06:31
@Vanals
Copy link
Contributor

Vanals commented Jul 13, 2022

https://nidigitalsolutions.jira.com/wiki/spaces/NPP/pages/1334083669/Engineering+release+process Should points 3 4 and 5 be influenced if releasing codemod too? Point 4 likely? I think would be good to ask feedbacks also from other devs around how we are changing the release process notes. And if is clear in the new release documentation

IMO it should not influence 3 and 5; About 4 maybe, depends if we want to have separate release notes for the codemod, but IMO is not needed.

As you click the button

Screenshot 2022-07-13 at 08 58 28

You will be creating a new release. tag + notes. So you eventually need to rename the notes, fill them in. Or delete them in a point 4.1?

Vanals
Vanals previously approved these changes Jul 13, 2022
@mutebg mutebg merged commit ec0c2e8 into main Jul 13, 2022
@mutebg mutebg deleted the feat/PPDSC-2162-codemods-setup-package branch July 13, 2022 11:10
Xin00163 pushed a commit that referenced this pull request Oct 17, 2022
* feat(PPDSC-2162): init codemod scripts

* feat(PPDSC-2162): make it cli

* feat(PPDSC-2162): adjust CI

* feat(PPDSC-2162): add version sync script

* feat(PPDSC-2162): update package.json

* feat(PPDSC-2162): add extra arguments

* feat(PPDSC-2162): add tests and update readme

* feat(PPDSC-2162): add failing test

* feat(PPDSC-2162): run unit tests in CI

* feat(PPDSC-2162): remove fake unit test

* feat(PPDSC-2162): test prettier

* feat(PPDSC-2162): test prettier

* feat(PPDSC-2162): fix prettier

* feat(PPDSC-2162): rename to codemod

* feat(PPDSC-2162): update readme

* feat(PPDSC-2162): add public access to npm

* feat(PPDSC-2162): make access public to npm

* feat(PPDSC-2162): address comments

* feat(PPDSC-2162): address comments

* feat(PPDSC-2162): branch circleci config

* feat(PPDSC-2162): fix typo

* feat(PPDSC-2162): fix circleci

* feat(PPDSC-2162): fix circleci

* feat(PPDSC-2162): add makefile

* feat(PPDSC-2162): fix circleci

* feat(PPDSC-2162): fix circleci

* feat(PPDSC-2162): fix circleci

* feat(PPDSC-2162): fix circleci

* feat(PPDSC-2162): fix circleci

* feat(PPDSC-2162): fix circleci

* feat(PPDSC-2162): fix circleci

* feat(PPDSC-2162): fix circleci

* feat(PPDSC-2162): fix circleci

* feat(PPDSC-2162): fix circleci

* feat(PPDSC-2162): circle-ci

* feat(PPDSC-2162): reverse config

* feat(PPDSC-2162): adjust pipeline

* feat(PPDSC-2162): adjust pipeline

* feat(PPDSC-2162): adjust pipeline

* Bumping to version v10.0.0 - [skip ci]

* feat(PPDSC-2162): fix package.json version

* feat(PPDSC-2162): bump version of codemode package

* feat(PPDSC-2162): remove fixed version

* feat(PPDSC-2162): cleanup

* feat(PPDSC-2162): change cache

* feat(PPDSC-2162): add codemod jobs to main

* feat(PPDSC-2162): fix circle

* feat(PPDSC-2162): update CI for codemods

* feat(PPDSC-2162): fix yml file

* feat(PPDSC-2162): fix yml file 2

* feat(PPDSC-2162): fix yml file 3

* feat(PPDSC-2162): fix yml file 4

* feat(PPDSC-2162): fix yml file 5

* feat(PPDSC-2162): fix yml file 6

* feat(PPDSC-2162): fix yml file 7

* feat(PPDSC-2162): fix yml file 8

* feat(PPDSC-2162): fix yml file 9

* feat(PPDSC-2162): fix yml file 10

* feat(PPDSC-2162): fix yml file 11

* feat(PPDSC-2162): update deps

* feat(PPDSC-2162): update deps

* feat(PPDSC-2162): clean

* feat(PPDSC-2162): ci pull_request_codemod

* feat(PPDSC-2162): ci main_codemod

* feat(PPDSC-2162): bumping codemod version to v1.2.3 - [skip ci]

* feat(PPDSC-2162): add release codemod jobs

* feat(PPDSC-2162): fix config

* feat(PPDSC-2162): adjust ci

* feat(PPDSC-2162): update to slack/notify

* feat(PPDSC-2162): rename a job

* feat(PPDSC-2162): move everything to lib folder

* feat(PPDSC-2162): fix ci cache

* feat(PPDSC-2162): fix ci cache

* feat(PPDSC-2162): update author in package json

* feat(PPDSC-2162): fix version in package json

* feat(PPDSC-2162): add author

* feat(PPDSC-2162): revert in ci

* feat(PPDSC-2162): clean

* feat(PPDSC-2162): add popover export
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This change contains a new feature ready for review Please assist in getting this reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants