Skip to content

Commit

Permalink
chore: build oauth2 connector on prepack
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyijun committed May 13, 2024
1 parent e388c66 commit 395bb81
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 14 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ jobs:
- name: Prepack
run: pnpm prepack

# Build connectors before running lint since some connectors rely on the generated types
- name: Build connectors
run: pnpm connectors build

- name: Lint
run: pnpm ci:lint

Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/upload-annotations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ jobs:
- name: Prepack
run: pnpm prepack

# Build connectors before running lint since some connectors rely on the generated types
- name: Build connectors
run: pnpm connectors build

- name: Lint with Report
run: pnpm -r --parallel lint:report && node .scripts/merge-eslint-reports.js

Expand Down
4 changes: 0 additions & 4 deletions .scripts/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ if (taggedPackages.length === 0) {

try {
execSync('pnpm prepack');
/**
* Build connectors before publish since some connectors rely on the generated types from oauth2 connector package.
*/
execSync('pnpm connectors build');
execSync('pnpm -r publish');
execSync('git push --follow-tags');
} catch (error) {
Expand Down
3 changes: 2 additions & 1 deletion packages/connectors/connector-oauth2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"lint:report": "pnpm lint --format json --output-file report.json",
"test": "vitest src",
"test:ci": "pnpm run test --silent --coverage",
"prepublishOnly": "pnpm build"
"prepublishOnly": "pnpm build",
"prepack": "pnpm build"
},
"engines": {
"node": "^20.9.0"
Expand Down
4 changes: 3 additions & 1 deletion packages/connectors/templates/sync-preset.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ const templateKeys = Object.keys(templateJson);

/**
* An object that contains exceptions for scripts that are allowed to be different from the template.
* Value format: `{ "<connector-name>": ["<script-name>"] }`
* Example: `{ "connector-oauth2": ["prepack"] }`
*/
const scriptExceptions = {};
const scriptExceptions = { 'connector-oauth2': ['prepack'] };

const sync = async () => {
const packagesDirectory = './';
Expand Down

0 comments on commit 395bb81

Please sign in to comment.