Skip to content

Commit db8c8e3

Browse files
chore: remove lifecycles scripts (#2839)
* chore: remove lifecycles scripts * chore: manually install chrome for puppeteer * chore: typo in yaml * chore: update test scripts * chore: update script * chore: update format script * fix: add cooldown * fix: remove github token * chore: pr feedback * chore: reworking app definition tests to fix tests * chore: add gh token back into release * chore: remove test branch from release --------- Co-authored-by: Ely Lucas <ely.lucas@contentful.com>
1 parent 93eafe9 commit db8c8e3

24 files changed

+88
-84
lines changed

.github/dependabot.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,5 @@ updates:
2424
- dependency-name: webpack
2525
versions:
2626
- '>= 5.0.0'
27+
cooldown:
28+
default-days: 15

.github/workflows/release.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,14 @@ jobs:
7171
env:
7272
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7373

74+
- name: Publish Docs
75+
if: github.ref == 'refs/heads/master'
76+
run: |
77+
echo "Publishing Documentation"
78+
npm run docs:publish
79+
env:
80+
GITHUB_TOKEN: ${{ steps.vault.outputs.GITHUB_TOKEN }}
81+
7482
- name: Get latest release tag
7583
id: get-tag
7684
run: |

.github/workflows/test-demo-projects.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
path: |
3535
dist
3636
key: build-cache-${{ github.run_id }}-${{ github.run_attempt }}
37-
37+
3838
- name: Run integration tests
3939
run: npm run test:demo-projects
4040
env:

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
lint-staged
1+
lint-staged

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ dist
33
coverage
44
out
55
typings
6+
test/output-integration/browser/public

package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"docs:watch": "nodemon --exec npm run docs:dev -w lib typings",
3636
"docs:publish": "npm run build:docs && ./node_modules/contentful-sdk-jsdoc/bin/publish-docs.sh contentful-management.js contentful-management",
3737
"lint": "eslint lib test",
38-
"pretest": "rimraf coverage && npm run lint",
38+
"lint:fix": "eslint lib test --fix",
3939
"test": "npm run test:unit:cover && npm run test:types && npm run test:integration:cover && npm run test:size",
4040
"test:unit:cover": "npm run test:unit -- --coverage",
4141
"test:unit": "npx vitest --project unit --run",
@@ -48,16 +48,12 @@
4848
"test:version": "grep -r \"0.0.0-determined-by-semantic-release\" ./dist > /dev/null && echo \"version 0.0.0-determined-by-semantic-release found in output\" && exit 1 || exit 0",
4949
"test:size": "size-limit",
5050
"test:demo-projects": "npm run test:demo-node && npm run test:demo-browser",
51-
"test:demo-node": "rimraf ./test/output-integration/node/node-modules && npm --prefix ./test/output-integration/node ci && vitest --run ./test/output-integration/node",
52-
"test:demo-browser": "rimraf ./test/output-integration/browser/node-modules && npm --prefix ./test/output-integration/browser ci && npm --prefix ./test/output-integration/browser run test",
53-
"test:prepush": "npm run build && npm run test:unit && npm run test:size",
54-
"format:fix": "prettier --write '**/*.{jsx,js,ts,tsx}'",
51+
"test:demo-node": "npm ci --prefix ./test/output-integration/node && npm run test --prefix ./test/output-integration/node",
52+
"test:demo-browser": "npm ci --prefix ./test/output-integration/browser && npm run setup-test-env --prefix ./test/output-integration/browser && npm run test --prefix ./test/output-integration/browser",
53+
"format:fix": "npm run format:check -- --write",
5554
"format:check": "prettier --check '**/*.{jsx,js,ts,tsx}'",
5655
"semantic-release": "semantic-release",
57-
"precommit": "npm run lint",
58-
"postpublish": "if [ \"$(git rev-parse --abbrev-ref HEAD)\" = master ] ; then npm run docs:publish && npm run clean ; else exit 0 ; fi",
59-
"prepush": "npm run test:prepush",
60-
"prepublishOnly": "npm run build && npm run test:version"
56+
"prepare": "husky"
6157
},
6258
"files": [
6359
"dist",
@@ -125,9 +121,9 @@
125121
}
126122
},
127123
"lint-staged": {
128-
"*.{js,ts}": [
124+
"./{lib,test}/*.{js,ts}": [
129125
"prettier --write",
130-
"eslint"
126+
"eslint --fix"
131127
],
132128
"*.md": [
133129
"prettier --write"

test/helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export async function createAppDefinition() {
120120
throw new Error(`Unable to load test organization`)
121121
}
122122
const appDefinition = await organization.createAppDefinition({
123-
name: 'Test App',
123+
name: 'Test App Definition for helpers.ts (delete if stale)',
124124
src: 'http://localhost:3000',
125125
locations: [
126126
{

test/integration/app-access-token-integration.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ describe('AppAccessToken api', { sequential: true }, () => {
3232
organization = await getTestOrganization()
3333

3434
appDefinition = await organization.createAppDefinition({
35-
name: 'Test AppAccessToken',
35+
name: 'Test AppAccessToken in CMA (delete if stale)',
3636
})
3737

3838
entityId = {

test/integration/app-action-call-structured-integration.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ describe('AppActionCall structured endpoints', function () {
2626

2727
// Create an app definition for installation context
2828
appDefinition = await organization.createAppDefinition({
29-
name: 'Structured AppActionCall Test',
29+
name: 'Structured AppActionCall Test in CMA (delete if stale)',
3030
})
3131

3232
client = initPlainClient({

0 commit comments

Comments
 (0)