Skip to content

Commit c997ba1

Browse files
benelanalisonailea
authored andcommitted
ci: remove workarounds no longer needed with Stencil v4 (#8325)
## 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.
1 parent 21c9ea7 commit c997ba1

File tree

3 files changed

+12
-24
lines changed

3 files changed

+12
-24
lines changed

.github/workflows/deploy-next.yml

+11-8
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@ jobs:
2121
registry-url: "https://registry.npmjs.org"
2222
env:
2323
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
24-
- name: e2e test
25-
run: |
26-
npm install
27-
npm run build
28-
npm test
2924
- name: storybook/next deployment
3025
env:
3126
NEXT_RELEASE_ENABLED: ${{ secrets.NEXT_RELEASE_ENABLED }}
@@ -36,14 +31,22 @@ jobs:
3631
if npm run util:is-next-deployable; then
3732
git config --global user.email "github-actions[bot]@users.noreply.github.com"
3833
git config --global user.name "github-actions[bot]"
34+
35+
npm install
36+
# version the packages with lerna before building to ensure
37+
# the version in the CC source code preamble is correct for deployment
38+
npm run version:next
39+
npm run build
40+
npm test
41+
3942
# deploy storybook, but still release next if it fails
4043
{ npm run --workspace=@esri/calcite-components build-storybook &&
4144
npx --workspace=@esri/calcite-components storybook-to-ghpages \
42-
--host-token-env-variable=GH_TOKEN_FOR_STORYBOOK --existing-output-dir=docs --ci; } || true
45+
--host-token-env-variable=GH_TOKEN_FOR_STORYBOOK \
46+
--existing-output-dir=docs --ci; } || true
4347
44-
# remove the build to docs after storybook deploys to gh-pages
48+
# remove the built docs after storybook deploys to gh-pages
4549
git reset --hard
46-
npm run version:next
4750
npm run publish:next
4851
npm run util:push-tags
4952
fi

packages/calcite-components/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
"lint:scss": "stylelint --fix \"src/**/*.scss\" && prettier --write \"**/*.scss\" >/dev/null",
3535
"lint:ts": "eslint --ext .ts,.tsx --fix . && prettier --write \"**/*.ts?(x)\" >/dev/null",
3636
"posttest": "npm run test:prerender",
37-
"prepublishOnly": "./support/buildForPreambleVersion.sh",
3837
"release:docs": "npm run docs && storybook-to-ghpages --existing-output-dir=docs",
3938
"start": "npm run util:clean-js-files && concurrently --kill-others --raw \"tsc --project ./tsconfig-demos.json --watch\" \"npm run build:watch-dev -- --serve\"",
4039
"test": "stencil test --no-docs --no-build --spec --e2e",
@@ -51,7 +50,7 @@
5150
"util:patch-esm-resolution": "ts-node --esm support/patchESMResolution.ts",
5251
"util:prep-build-reqs": "npm run util:copy-assets && npm run util:generate-t9n-types",
5352
"util:sync-t9n-en-bundles": "ts-node --esm support/syncEnT9nBundles.ts",
54-
"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",
53+
"util:test-types": "! grep -rnw 'dist/types' -e '<reference types='",
5554
"util:clean-js-files": "rimraf --glob -- *.js {src,.storybook,support}/**.js",
5655
"util:clean-readmes": "git restore src/components/*/readme.md",
5756
"util:is-working-tree-clean": "[ -z \"$(git status --porcelain=v1)\" ]"

packages/calcite-components/support/buildForPreambleVersion.sh

-14
This file was deleted.

0 commit comments

Comments
 (0)