-
Notifications
You must be signed in to change notification settings - Fork 1
[Chore][DEVX-573] Initial Package Migration #1
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
Merged
Merged
Changes from 25 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
d0d4bd8
feat(personal-data-erasure): migrate personal data erasure package
ajimae 4ed679b
feat(resource-deleter): add resource deleter
ajimae 66d2aef
chore(add-repo-tools): add repository tools
ajimae d05f765
chore(prettier-config): configure prettier
ajimae 57f3552
chore(repo-enhancement): enhance repository
ajimae 596ed81
chore(add-custom-objects): include custom objects deletion
ajimae 84b1d62
chore(add-codeowners): add github codeowners
ajimae 29bd6bc
fix(workflow): fix workflow missing action.yml
ajimae 250be7b
fix(workflow): fix workflow missing action.yml
ajimae 3254a74
fix(workflow): fix workflow action
ajimae a60ba4d
fix(workflow): fix workflow action
ajimae a1dc5cb
fix(workflow): fix workflow action
ajimae 0eed1fa
fix(workflow): fix workflow action
ajimae c7f6271
fix(workflow): fix workflow action
ajimae 3d4f9f1
fix(workflow): fix workflow action
ajimae 35ada8f
fix(workflow): fix workflow action
ajimae a4f9dfe
fix(workflow): fix workflow action
ajimae cd7e3f6
chore(changelog-github): add missing packages
ajimae 4051d8c
fix(workflow): fix workflow action
ajimae 19b1616
fix(workflow): fix workflow action
ajimae f7c703c
fix(workflow): fix workflow action
ajimae 101e841
fix(workflow): fix workflow action
ajimae 5c349b1
fix(workflow): fix workflow action
ajimae a223c1e
fix(workflow): fix workflow action
ajimae 67bfa06
chore(clean-up): remove commented blocks
ajimae b922b43
chore(eslint-rule): add eslint rule
ajimae 6d505e7
Update .github/actions/ci/action.yml
ajimae 1c21e52
Merge branch 'chore/initial-package-migration' of github.com:commerce…
ajimae c5ae4c9
chore(actions-commit-hash): update github actions versions
ajimae 63f747c
chore(renovate): configure renovate
ajimae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # Changesets | ||
|
|
||
| Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works | ||
| with multi-package repos, or single-package repos to help you version and publish your code. You can | ||
| find the full documentation for it [in our repository](https://github.com/changesets/changesets) | ||
|
|
||
| We have a quick list of common questions to get you started engaging with this project in | ||
| [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| { | ||
| "$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json", | ||
| "changelog": [ | ||
| "@changesets/changelog-github", | ||
| { | ||
| "repo": "commercetools/typescript-dev-utilities" | ||
| } | ||
| ], | ||
| "commit": false, | ||
| "fixed": [], | ||
| "linked": [], | ||
| "access": "restricted", | ||
| "baseBranch": "main", | ||
| "updateInternalDependencies": "patch", | ||
| "ignore": [] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| '@commercetools/personal-data-erasure': major | ||
| '@commercetools/resource-deleter': major | ||
| --- | ||
|
|
||
| migrate packages to typescript |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| root = true | ||
|
|
||
| [*] | ||
| charset = utf-8 | ||
| end_of_line = lf | ||
| indent_size = 2 | ||
| indent_style = space | ||
| insert_final_newline = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| /.yarn/** linguist-vendored | ||
| /.yarn/releases/* binary | ||
| /.yarn/plugins/**/* binary | ||
| /.pnp.* binary linguist-generated |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| * @commercetools/developer-tooling |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| name: CI | ||
|
|
||
| description: Shared action to install dependencies | ||
|
|
||
| runs: | ||
| using: composite | ||
|
|
||
| steps: | ||
| - name: Read .nvmrc | ||
| id: nvm | ||
| run: echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_OUTPUT | ||
| shell: bash | ||
|
|
||
| - name: Enable corepack | ||
| run: corepack enable | ||
| shell: bash | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version-file: ".nvmrc" | ||
| cache: "yarn" | ||
|
|
||
| # Whenever on a changeset versioning PR | ||
| # Then installing can not fail with lockfile changes | ||
| # Because the package.json for integration test changes. | ||
|
|
||
| - name: Install | ||
| run: yarn install --immutable | ||
| shell: bash | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,117 @@ | ||
| name: Qa | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - 'main' | ||
| - '!changeset-release/**' | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| immutable-install: | ||
| if: ${{ !startsWith(github.ref, 'refs/heads/changeset-release/') }} | ||
| name: Immutable Install | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
ajimae marked this conversation as resolved.
Outdated
|
||
|
|
||
| - name: Setup | ||
| uses: ./.github/actions/ci | ||
|
|
||
| # The shared install action does not respect the | ||
| # `--immutable` flag, so we need to run it here. | ||
| - name: Install with lockfile | ||
| run: yarn install --immutable | ||
|
|
||
| linting: | ||
| if: ${{ !startsWith(github.ref, 'refs/heads/changeset-release/') }} | ||
| name: Linting | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup | ||
| uses: ./.github/actions/ci | ||
|
|
||
| - name: Lint | ||
| run: yarn lint | ||
|
|
||
| type-checking: | ||
| if: ${{ !startsWith(github.ref, 'refs/heads/changeset-release/') }} | ||
| name: Type checking | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup | ||
| uses: ./.github/actions/ci | ||
|
|
||
| - name: TypeScript | ||
| run: yarn typecheck | ||
|
|
||
| testing: | ||
| if: ${{ !startsWith(github.ref, 'refs/heads/changeset-release/') }} | ||
| name: Testing | ||
| needs: [immutable-install, linting, type-checking] | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup | ||
| uses: ./.github/actions/ci | ||
|
|
||
| - name: Build | ||
| run: yarn build | ||
|
|
||
| - name: Link cli binaries | ||
| run: yarn link | ||
|
|
||
| - uses: oNaiPs/secrets-to-env-action@v1 | ||
| with: | ||
| secrets: ${{ toJSON(secrets) }} | ||
|
|
||
| - name: Test (with coverage) | ||
| run: yarn test:pkg --coverage | ||
|
|
||
| regression-testing: | ||
| if: ${{ !startsWith(github.ref, 'refs/heads/changeset-release/') }} | ||
| name: Regression Testing | ||
| needs: [testing] | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| version: [18, 20] | ||
| fail-fast: true | ||
| max-parallel: 1 | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup | ||
| uses: ./.github/actions/ci | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ matrix.version }} | ||
|
|
||
| - name: Build | ||
| run: yarn build | ||
|
|
||
| - name: Link cli binaries | ||
| run: yarn link | ||
|
|
||
| - uses: oNaiPs/secrets-to-env-action@v1 | ||
| with: | ||
| secrets: ${{ toJSON(secrets) }} | ||
|
|
||
| - name: Integration tests | ||
| run: yarn test:pkg --coverage | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| name: Release | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| jobs: | ||
| release: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| # Get GitHub token via the CT Changesets App | ||
| - name: Generate GitHub token (via CT Changesets App) | ||
| id: generate_github_token | ||
| uses: tibdex/github-app-token@v2.1.0 | ||
| with: | ||
| app_id: ${{ secrets.CT_CHANGESETS_APP_ID }} | ||
| private_key: ${{ secrets.CT_CHANGESETS_APP_PEM }} | ||
|
|
||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| # Pass a personal access token (using our CT Changesets App) to be able to trigger other workflows | ||
| # https://help.github.com/en/actions/reference/events-that-trigger-workflows#triggering-new-workflows-using-a-personal-access-token | ||
| # https://github.community/t/action-does-not-trigger-another-on-push-tag-action/17148/8 | ||
| token: ${{ steps.generate_github_token.outputs.token }} | ||
|
|
||
| - name: Setup | ||
| uses: ./.github/actions/ci | ||
|
|
||
| - name: Creating .npmrc | ||
| run: | | ||
| cat << EOF > "$HOME/.npmrc" | ||
| email=npmjs@commercetools.com | ||
| //registry.npmjs.org/:_authToken=$NPM_TOKEN | ||
| EOF | ||
| env: | ||
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
|
||
| - name: Building packages | ||
| run: yarn build | ||
|
|
||
| - name: Create Release Pull Request or Publish to npm | ||
| id: changesets | ||
| uses: changesets/action@master | ||
| with: | ||
| publish: pnpm changeset publish | ||
| version: pnpm changeset:version-and-format | ||
| commit: 'ci(changesets): version packages' | ||
| env: | ||
| GITHUB_TOKEN: ${{ steps.generate_github_token.outputs.token }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| yarn commitlint --edit $1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| yarn typecheck | ||
| yarn test && yarn lint-staged |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| require('dotenv').config() | ||
|
ajimae marked this conversation as resolved.
Outdated
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| { | ||
| "*.ts": [ | ||
| "eslint", | ||
| "prettier . --write" | ||
| ], | ||
| "*.js": [ | ||
| "eslint", | ||
| "prettier . --write" | ||
| ], | ||
| "*.json": [ | ||
| "eslint", | ||
| "prettier . --write" | ||
| ], | ||
| "*.md": "prettier . --write" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 22.14.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| .* | ||
| node_modules | ||
| *.d.ts | ||
| *yarn* | ||
| *.cjs | ||
| *.http | ||
| *.env | ||
| LICENSE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| { | ||
| "semi": true, | ||
| "tabWidth": 2, | ||
| "filepath": "src", | ||
| "trailingComma": "es5", | ||
| "singleQuote": true, | ||
| "parser": "typescript", | ||
| "overrides": [ | ||
| { | ||
| "files": "*.json", | ||
| "options": { | ||
| "parser": "json" | ||
| } | ||
| }, | ||
| { | ||
| "files": "*.md", | ||
| "options": { | ||
| "parser": "markdown" | ||
| } | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| nodeLinker: node-modules |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| # dev-utilities | ||
| # commercetools Typescript Dev Utilities | ||
|
|
||
| This repository contains some development utilities for working with the commercetools Platform API |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| /** | ||
| * @type {import('@babel/core').TransformOptions} | ||
| */ | ||
| module.exports = { | ||
| presets: [ | ||
| ['@babel/preset-env', { targets: { node: 'current' } }], | ||
| '@babel/preset-typescript', | ||
| ], | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| module.exports = { | ||
| extends: ['@commitlint/config-conventional'], | ||
| parserPreset: { | ||
| parserOpts: { | ||
| // Allow to write a "scope" with slashes | ||
| // E.g. `refactor(app/my-component): something` | ||
| headerPattern: /^(\w*)(?:\(([\w\$\.\/\-\* ]*)\))?\: (.*)$/, | ||
| }, | ||
| }, | ||
| rules: { | ||
| 'header-max-length': [0, 'always', 100], | ||
| }, | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| export const opts = { | ||
| bundle: true, | ||
| platform: 'node', | ||
| target: 'node8', | ||
| format: 'cjs', | ||
| outbase: 'src', | ||
| outdir: '.', | ||
| // minify: true, | ||
| // sourcemap: true, | ||
| }; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.