Commit Graph

15 Commits

Author SHA1 Message Date
Matt Sherman eab7750208
Move product-editor CES-related components and utilities (#37131)
* Update package.json and lock file
* Move ProductMVPFeedbackModal to @woocommerce/product-editor
* Move ProductMVPFeedbackModalContainer to @woocommerce/product-editor
* Move ProductMVPCESFooter and useProductMVPCESFooter to @woocommerce/product-editor
* FIx mock of __experimentalUseProductMVPCESFooter in test
2023-03-28 13:38:08 -04:00
Chi-Hsuan Huang 4cb893dda9 Update admin tsconfig to isolated from other projects 2022-04-15 13:50:18 +08:00
Chi-Hsuan Huang 4592d49cfb Fix tsconfig path 2022-03-29 16:07:09 +08:00
Chi-Hsuan Huang 4ca1ae0032 Fix paths in tsconfig 2022-03-29 16:06:32 +08:00
RJ f306cc2ba5 Enable Typescript checking on ./client folder (https://github.com/woocommerce/woocommerce-admin/pull/8372)
* Copied .tsconfig into ./client to enable ts checking

- Made sub-repos composite typescript packages where necessary

* Prevent tsc from transpiling ./client

 - we use webpack for transpiling so no need for this

* Added tsc resolution path for @automattic/explat-client

- Seems like there's a type export issue (?) with @automattic/explat-client and @automattic/explat-client-react-helpers
- adding the node_modules/@automattic/explat-client path in tsconfig seems to help TS resolve this using the source .ts files
- found answer here: https://github.com/microsoft/TypeScript/issues/42873
- should figure out what's actually wrong with the type exports and fix that there instead

* Removed mandatory checking from webpack

- removed this for now as it will block all development until all type inconsistencies are fixed
- for now, run the optional ts:check task either in console or vscode for highlighting type errors

* Added vscode tasks for typescript checking

* Patch @automattic/explat-client-react-helpers

- this changes the installed code in node_modules (post-installation) for @automattic/explat-client-react-helpers so that it exports the necessary type interfaces required by us
- attempted unsuccessfully to override type exports using declare module
- not too sure how to fix this internally by other means
- have to investigate what fixes to propose to @automattic/explat-client-react-helpers team

* changed tests in ./client to use ts-jest instead of babel-jest

- rewrote jest config to use ts-jest instead of babel-jest
- set ts errors to warnings instead so that tests don't fail on type errors
- created new tsconfig for ./packages/js-tests so that build and ts-check are separate, as js-tests need to be built for commonjs
2022-03-01 12:19:07 +08:00
louwie17 3998f88597 Remove unpublished wc-admin-settings package and update getSetting usage (https://github.com/woocommerce/woocommerce-admin/pull/8057)
* Remove use of wc-admin-settings from packages

* Move getSetting to getAdminSetting and remove wc-admin-settings package

* Add changelog

* Update package.json and remove last use of wc-admin-settings
2022-01-06 08:53:30 -04:00
Jeff Stieler 4ef7ff8dfb Fix TSC config and package build script. (https://github.com/woocommerce/woocommerce-admin/pull/7361) 2021-07-15 10:38:34 -04:00
Jeff Stieler 8e61f55017 Allow packages to be built in isolation. (https://github.com/woocommerce/woocommerce-admin/pull/7286)
* Use yarn instead of npm.

In prep for workspaces, since we're locked to npm < 7. See: https://github.com/woocommerce/woocommerce-admin/pull/7126#issue-661287749

* Initial workspace creation.

* Add initial tsc build to @woocommerce/number.

* Attempt to build experimental package.

* Try currency package.

* Define all packages as workspaces.

* Use tsconfig common to packages.

* Fix currency package build.

* Build csv-export with tsc.

* Try to build customer-effort-score with tsc.

* Fix JSX pragma.

* Build data package with tsc.

* Build date package with tsc.

* Build experimental package with tsc.

* Try to build explat package with tsc.

* Build navigation package with tsc.

* Build notices package with tsc.

* Build onboarding package with tsc.

* Build components package with tsc.

* Swap in package JS build into main script.

* Fix experimental package build.

* Try per-package css build with components.

* Try to run components package tests in isolation.

Broken on JSX in test files not being transformed.

* Move @woocommerce/wc-admin-settings into a package.

* Try to fix components package tests.

Fails because we aren't setting up the jest/jest-dom globals.

* Move JS test code to reusable (private) package.

* Enable incremental TS builds.

* Use workspaces to run JS tests.

* Use new jest configs for update snapshot scripts.

* Fix style builds.

* Fix package version in components.

* Fix client test debug and watch scripts.

* Update yarn lock.

* Update test-staged behavior.

* Try to fix storybook.

* Fix storybook.

* Update more npm commands to yarn.

* Add changelog.

* Fix lint errors.

* Update packages readme script references.

* Clean up unused gitignore match.

* Fix another npm command.

* Fix JS builds on watch.

* Fix start script.

* Fix start scripts for packages.

* Use tsc to build packages before tests

* yarn -> npm.

# Conflicts:
#	package-lock.json
#	package.json

* Fix linter error.

* Remove workspace definitions.

* Fix missing Fragment import.

* Fix package lock.

* Fix missing reference.

* Only build commonjs module for js-tests helper.

* Remove errant dependency from components.

* Remove noop scripts.

* Fix package JS build before testing.

* Revert noisy formatting changes.

* Fix precommit and test scripts.

* Fix minimum expected recommended extension count.

Japan test case breaks this.

* Revert babel config changes.

* chore(release): publish

 - @woocommerce/components@7.2.0
 - @woocommerce/csv-export@1.4.0
 - @woocommerce/currency@3.2.0
 - @woocommerce/customer-effort-score@1.1.0
 - @woocommerce/data@1.4.0
 - @woocommerce/date@3.1.0
 - @woocommerce/dependency-extraction-webpack-plugin@1.7.0
 - @woocommerce/eslint-plugin@1.3.0
 - @woocommerce/experimental@1.5.0
 - @woocommerce/explat@1.1.0
 - @woocommerce/js-tests@1.1.0
 - @woocommerce/navigation@6.1.0
 - @woocommerce/notices@3.1.0
 - @woocommerce/number@2.2.0
 - @woocommerce/onboarding@1.1.0
 - @woocommerce/tracks@1.1.0
 - @woocommerce/wc-admin-settings@1.1.0

* Add script for running 'start' in a package.

* Remove yarn from gitignore.

* Update package changelogs, prep versions for release.

* Try to fix E2E tests after main merge.

* Some cleanup.

* Add changelog.

Co-authored-by: Paul Sealock <psealock@gmail.com>
2021-07-14 16:38:57 -04:00
Paul Sealock b7360d0d55 Add typescript to Nav utils (https://github.com/woocommerce/woocommerce-admin/pull/6477)
* Add typescript to nav utils--no-verify

* save

* progress

* fixup category

* better

* getting closer

* grrr

* appease the type gods

* move types to start of page

* Fixup addHistoryListener

* Add typescript to nav utils--no-verify

* save

* progress

* fixup category

* better

* fix tsconfig

* changelog

* add babel jest typescript preset for tests

* fix rebase issue

* PR feedabck

* update package-lock

* eslint fix
2021-03-18 16:38:38 +13:00
louwie17 9b180db614 Add Typescript and page objects to E2E suite (https://github.com/woocommerce/woocommerce-admin/pull/6582)
* Initial playwright

* Updated e2e to use playwright and typescript

* Update set up environment and jest package

* Add changelog

* Add await to uncheck

* Fix formatting

* Revert jset back to ~24, as >25 runs slower, see facebook/jestwoocommerce/woocommerce-admin#9457

* Removed some unnecessary uses of waitForSelector

* Fix eslint issue

* Fix the e2e tests with latest updates

* Running most tests, with typescript now

* Fix any outstanding queries for the tests to work

* Update changelog

* Remove unnecessary jest version and unnecessary transform setting

* Fix test case broken after rebase

* Add fix to make e2e tests more robust

* Making sure dropdown value is correct

* Reove the wcpay condition for features number
2021-03-17 16:22:09 -03:00
louwie17 cb3c1e88e8 Add tilde (~) option for client root directory (https://github.com/woocommerce/woocommerce-admin/pull/6517)
* Add tilde option for client root directory

* Support tilde start as internal to fix lint issues

* Update baseUrl and paths so auto complete works correctly

* Add changelogs

* Add eslint support for webpack resolvers

Co-authored-by: Matt Sherman <matt@jam123.com>
2021-03-10 11:11:37 -04:00
Sam Seay 630f31ae9d Clean up unused deps and add TS to the build. (https://github.com/woocommerce/woocommerce-admin/pull/6441) 2021-03-01 16:01:22 +13:00
Sam Seay 2f1d65847c Remove usage of __experimentalResolveSelect (https://github.com/woocommerce/woocommerce-admin/pull/4949)
This uses a generator action and hooks to reimplement the CTA as a more
simple and logicless component, with most of the logic now in the
HOC component.
2020-08-20 16:02:01 +12:00
Sam Seay 0d95facf92 Task list - add a shortcut back to store setup (https://github.com/woocommerce/woocommerce-admin/pull/4853)
Fixes woocommerce/woocommerce-admin#4592

This adds the functionality to support a store setup tab displayed in ActivityPanel. The tab currently just redirects to the home page, rather than implementing the nice-to-haves of displaying the task list in the panel. The reason for this, is that I found it would require significant refactoring of the task list to support this currently.

As part of this I have also refactored rendering of tabs inside into 2 new functional components: <Tabs> and <Tab>. The reason for this is to decompose large untestable components, test them and by virtue of being decomposed they will also be more reusable in future. Ideally would have been refactored to a functional component as well, but it would have been too large a task.
2020-08-06 10:02:24 +12:00
Sam Seay a52610640f Clean up webpack config and add tsconfig.json (https://github.com/woocommerce/woocommerce-admin/pull/4800) 2020-08-04 15:41:09 +12:00