Skip to content

Commit

Permalink
ci: remove workarounds no longer needed with Stencil v4 (#8325)
Browse files Browse the repository at this point in the history
## Summary

Removes some workarounds that are no longer needed. The first types test
was because we didn't commit `components.d.ts` and needed to build twice
to get the correct types. After updating to Stencil v4, we started
getting JSDOM type errors from that test.

```
../../node_modules/puppeteer/lib/types.d.ts:7584:5 - error TS18028: Private identifiers are only available when targeting ECMAScript 2015 and higher.

7584     #private;
         ~~~~~~~~

Found 22 errors in the same file, starting at: ../../node_modules/puppeteer/lib/types.d.ts:33
```

It looks like it is using the wrong tsconfig or something, because we
are above ES2015. Alternatively we could use `skipLibCheck`, but that
can cause a variety of issues, especially with monorepos.

Also removes the extra build that happens before publishing CC. It was
originally for the `component.d.ts` types issue and to make sure the
version is correct in the source code preamble. Now that we don't have
the types issue anymore, we can move the versioning before the first
build in the CI to get rid of the second build.
  • Loading branch information
benelan authored Dec 6, 2023
1 parent ec806f6 commit 65d1542
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 24 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/deploy-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ jobs:
registry-url: "https://registry.npmjs.org"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: e2e test
run: |
npm install
npm run build
npm test
- name: storybook/next deployment
env:
NEXT_RELEASE_ENABLED: ${{ secrets.NEXT_RELEASE_ENABLED }}
Expand All @@ -36,14 +31,22 @@ jobs:
if npm run util:is-next-deployable; then
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
npm install
# version the packages with lerna before building to ensure
# the version in the CC source code preamble is correct for deployment
npm run version:next
npm run build
npm test
# deploy storybook, but still release next if it fails
{ npm run --workspace=@esri/calcite-components build-storybook &&
npx --workspace=@esri/calcite-components storybook-to-ghpages \
--host-token-env-variable=GH_TOKEN_FOR_STORYBOOK --existing-output-dir=docs --ci; } || true
--host-token-env-variable=GH_TOKEN_FOR_STORYBOOK \
--existing-output-dir=docs --ci; } || true
# remove the build to docs after storybook deploys to gh-pages
# remove the built docs after storybook deploys to gh-pages
git reset --hard
npm run version:next
npm run publish:next
npm run util:push-tags
fi
Expand Down
3 changes: 1 addition & 2 deletions packages/calcite-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"lint:scss": "stylelint --fix \"src/**/*.scss\" && prettier --write \"**/*.scss\" >/dev/null",
"lint:ts": "eslint --ext .ts,.tsx --fix . && prettier --write \"**/*.ts?(x)\" >/dev/null",
"posttest": "npm run test:prerender",
"prepublishOnly": "./support/buildForPreambleVersion.sh",
"release:docs": "npm run docs && storybook-to-ghpages --existing-output-dir=docs",
"start": "npm run util:clean-js-files && concurrently --kill-others --raw \"tsc --project ./tsconfig-demos.json --watch\" \"npm run build:watch-dev -- --serve\"",
"test": "stencil test --no-docs --no-build --spec --e2e",
Expand All @@ -51,7 +50,7 @@
"util:patch-esm-resolution": "ts-node --esm support/patchESMResolution.ts",
"util:prep-build-reqs": "npm run util:copy-assets && npm run util:generate-t9n-types",
"util:sync-t9n-en-bundles": "ts-node --esm support/syncEnT9nBundles.ts",
"util:test-types": "tsc --esModuleInterop dist/types/**/*.d.ts dist/components/*.d.ts && ! grep -rnw 'dist/types' -e '<reference types=' && npm run util:clean-js-files",
"util:test-types": "! grep -rnw 'dist/types' -e '<reference types='",
"util:clean-js-files": "rimraf --glob -- *.js {src,.storybook,support}/**.js",
"util:clean-readmes": "git restore src/components/*/readme.md",
"util:is-working-tree-clean": "[ -z \"$(git status --porcelain=v1)\" ]"
Expand Down
14 changes: 0 additions & 14 deletions packages/calcite-components/support/buildForPreambleVersion.sh

This file was deleted.

0 comments on commit 65d1542

Please sign in to comment.