Skip to content
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

feat: export csm #552

Merged
merged 76 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from 75 commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
cf5819f
chore: bump @types/node from 20.10.4 to 20.10.5 (#475)
dependabot[bot] Dec 18, 2023
a6a62f8
chore: bump vite from 5.0.7 to 5.0.10 (#478)
dependabot[bot] Dec 18, 2023
02e9a38
chore: bump @types/react from 18.2.43 to 18.2.45 (#477)
dependabot[bot] Dec 18, 2023
00db50a
chore: bump @types/react-dom from 18.2.17 to 18.2.18 (#476)
dependabot[bot] Dec 18, 2023
7bb4382
chore: bump lerna from 8.0.0 to 8.0.1 (#480)
dependabot[bot] Dec 18, 2023
ddb0488
chore: bump eslint-plugin-import from 2.29.0 to 2.29.1 (#479)
dependabot[bot] Dec 18, 2023
d26538e
chore: bump contentful-management from 11.6.1 to 11.7.0 (#485)
dependabot[bot] Dec 25, 2023
3131cc8
chore: bump vitest from 1.0.4 to 1.1.0 (#486)
dependabot[bot] Dec 25, 2023
479e266
chore: bump contentful from 10.6.14 to 10.6.15 (#487)
dependabot[bot] Jan 1, 2024
8cd58ab
chore: bump contentful-management from 11.7.0 to 11.7.3 (#488)
dependabot[bot] Jan 1, 2024
2def8c5
chore: bump vitest from 1.1.0 to 1.1.1 (#489)
dependabot[bot] Jan 1, 2024
def3427
chore: bump @types/react from 18.2.45 to 18.2.46 (#490)
dependabot[bot] Jan 1, 2024
96b19a4
chore: bump @types/node from 20.10.5 to 20.10.6 (#491)
dependabot[bot] Jan 1, 2024
b6a9427
chore: bump type-fest from 4.8.3 to 4.9.0 (#492)
dependabot[bot] Jan 1, 2024
b3e3693
feat: implement CSM transformation to encoded strings for GraphQL [TO…
YvesRijckaert Jan 2, 2024
d9b3618
chore: bump vite from 5.0.10 to 5.0.11 (#494)
dependabot[bot] Jan 8, 2024
d6a614c
chore: bump contentful from 10.6.15 to 10.6.16 (#495)
dependabot[bot] Jan 8, 2024
e8a581a
chore: bump contentful-management from 11.7.3 to 11.8.0 (#496)
dependabot[bot] Jan 8, 2024
49998da
chore: bump jsdom from 23.0.1 to 23.2.0 (#497)
dependabot[bot] Jan 8, 2024
a9d0834
chore: bump @commitlint/cli from 18.4.3 to 18.4.4 (#498)
dependabot[bot] Jan 8, 2024
79b2d9e
chore: bump @types/react from 18.2.46 to 18.2.47 (#499)
dependabot[bot] Jan 8, 2024
55b04dc
chore: bump @types/node from 20.10.6 to 20.10.7 (#500)
dependabot[bot] Jan 8, 2024
bf963f6
chore: bump @commitlint/config-conventional from 18.4.3 to 18.4.4 (#501)
dependabot[bot] Jan 8, 2024
9444884
chore: bump vitest from 1.1.1 to 1.1.3 (#502)
dependabot[bot] Jan 8, 2024
7700be0
chore: bump lerna from 8.0.1 to 8.0.2 (#503)
dependabot[bot] Jan 8, 2024
b7af99d
chore: bump follow-redirects from 1.15.2 to 1.15.4 (#505)
dependabot[bot] Jan 10, 2024
d80a086
chore: bump @types/node from 20.10.7 to 20.11.0 (#506)
dependabot[bot] Jan 15, 2024
b8dd0ce
chore: bump contentful-management from 11.8.0 to 11.12.0 (#507)
dependabot[bot] Jan 15, 2024
2aa04c5
chore: bump vitest from 1.1.3 to 1.2.0 (#508)
dependabot[bot] Jan 15, 2024
da27bda
feat: add package read policy [TOL-1702] (#511)
2wce Jan 18, 2024
48b826e
chore: bump vite from 5.0.11 to 5.0.12 (#514)
dependabot[bot] Jan 19, 2024
e766e47
chore: bump vite in /examples/next-13-app-router-ssr (#515)
dependabot[bot] Jan 19, 2024
a97c7ce
chore: bump @types/react from 18.2.47 to 18.2.48 (#516)
dependabot[bot] Jan 22, 2024
72fd27f
chore: bump contentful-management from 11.12.0 to 11.13.0 (#517)
dependabot[bot] Jan 22, 2024
8c2e832
chore: bump @types/node from 20.11.0 to 20.11.5 (#518)
dependabot[bot] Jan 22, 2024
4f78e73
chore: bump vitest from 1.2.0 to 1.2.1 (#519)
dependabot[bot] Jan 22, 2024
8e2a306
chore: bump jsdom from 23.2.0 to 24.0.0 (#520)
dependabot[bot] Jan 22, 2024
97ec595
chore(release): updated release notes and package versions [ci skip]
contentful-automation[bot] Jan 22, 2024
f7ce15d
feat: setup gh packages [TOL-1702] (#512)
2wce Jan 22, 2024
f6c53fe
chore(release): updated release notes and package versions [ci skip]
contentful-automation[bot] Jan 22, 2024
8c2327c
chore: bump eslint-plugin-import-helpers from 1.2.1 to 1.3.1 (#521)
dependabot[bot] Jan 22, 2024
b0b8e7c
refactor: small clean up and adding tests (#522)
z0al Jan 22, 2024
8b3aea1
chore(release): updated release notes and package versions [ci skip]
contentful-automation[bot] Jan 22, 2024
9ba0d03
feat: recognise auto-tagged elements [TOL-1711] (#523)
z0al Jan 26, 2024
da504d4
chore(release): updated release notes and package versions [ci skip]
contentful-automation[bot] Jan 26, 2024
a7d4cf1
fix: release using the wrong credentials [] (#524)
chrishelgert Jan 26, 2024
9223892
fix: pass experimental flags from LivePreviewProvider [TOL-1711] (#525)
z0al Jan 26, 2024
8b566a2
chore(release): updated release notes and package versions [ci skip]
contentful-automation[bot] Jan 26, 2024
a3632d5
chore: add catalog info file [] (#527)
chrishelgert Jan 26, 2024
9f445c5
chore(release): updated release notes and package versions [ci skip]
contentful-automation[bot] Jan 26, 2024
71c2915
chore: bump vitest from 1.2.1 to 1.2.2 (#528)
dependabot[bot] Jan 29, 2024
b0a1b79
chore: bump @commitlint/config-conventional from 18.0.0 to 18.6.0 (#530)
dependabot[bot] Jan 29, 2024
e8d58d7
chore: bump contentful-management from 11.13.0 to 11.14.0 (#529)
dependabot[bot] Jan 29, 2024
8d32ec4
chore: bump @types/node from 20.11.5 to 20.11.10 (#532)
dependabot[bot] Jan 29, 2024
8dc6d9d
chore: bump @typescript-eslint/parser from 6.19.0 to 6.19.1 (#534)
dependabot[bot] Jan 29, 2024
46e5178
chore: bump type-fest from 4.9.0 to 4.10.1 (#535)
dependabot[bot] Jan 29, 2024
b4bb7eb
chore: bump husky from 8.0.3 to 9.0.6 (#536)
dependabot[bot] Jan 29, 2024
79705ca
chore: bump contentful from 10.6.16 to 10.6.19 (#537)
dependabot[bot] Jan 29, 2024
df2bf43
chore: bump @contentful/rich-text-types from 16.3.0 to 16.3.3 (#538)
dependabot[bot] Jan 29, 2024
1e720af
chore: bump @typescript-eslint/eslint-plugin from 6.19.0 to 6.19.1 (#…
dependabot[bot] Jan 29, 2024
bb3ce44
chore: bump @commitlint/cli from 18.0.0 to 18.6.0 (#531)
dependabot[bot] Jan 29, 2024
9ef008e
chore: bump @types/node from 20.11.10 to 20.11.16 (#540)
dependabot[bot] Feb 5, 2024
a391725
chore: bump type-fest from 4.10.1 to 4.10.2 (#541)
dependabot[bot] Feb 5, 2024
257a6d2
chore: bump @vitejs/plugin-react-swc from 3.5.0 to 3.6.0 (#542)
dependabot[bot] Feb 5, 2024
ee416cd
chore: bump husky from 9.0.6 to 9.0.10 (#543)
dependabot[bot] Feb 5, 2024
89aa874
chore: bump @contentful/rich-text-types from 16.3.3 to 16.3.4 (#544)
dependabot[bot] Feb 5, 2024
0be9b1d
chore: bump @types/react from 18.2.48 to 18.2.52 (#545)
dependabot[bot] Feb 5, 2024
d65ed5b
chore: bump @typescript-eslint/eslint-plugin from 6.19.1 to 6.20.0 (#…
dependabot[bot] Feb 5, 2024
f8631ea
chore: bump contentful from 10.6.19 to 10.6.21 (#547)
dependabot[bot] Feb 5, 2024
0c8e50a
chore: bump @testing-library/react from 14.1.2 to 14.2.1 (#548)
dependabot[bot] Feb 5, 2024
84c5bdb
chore: bump contentful-management from 11.14.0 to 11.14.2 (#549)
dependabot[bot] Feb 5, 2024
e6bb290
chore: bump lint-staged from 15.2.0 to 15.2.1 (#551)
dependabot[bot] Feb 5, 2024
878b0ad
chore(release): updated release notes and package versions [ci skip]
contentful-automation[bot] Feb 5, 2024
823b7d5
chore: bump @typescript-eslint/parser from 6.19.1 to 6.20.0 (#550)
dependabot[bot] Feb 5, 2024
abe444e
feat: export csm
YvesRijckaert Feb 5, 2024
13759b5
chore: remove visual sdk dependency
YvesRijckaert Feb 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ commands:
- restore_cache: *cache-key
- vault/get-secrets:
template-preset: 'semantic-release'
- run: 'echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc'
- run: |
echo "//npm.pkg.github.com/:_authToken=${GITHUB_PACKAGES_READ_TOKEN}" > ~/.npmrc
echo "@contentful:registry=https://npm.pkg.github.com" >> ~/.npmrc
- run: yarn install --prefer-offline --pure-lockfile
- save_cache:
<<: *cache-key
Expand Down Expand Up @@ -50,7 +52,9 @@ jobs:
template-preset: 'semantic-release'
- yarn_install
- vault/configure-lerna
- run: echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > ~/.npmrc
- run: |
echo "//npm.pkg.github.com/:_authToken=${GITHUB_PACKAGES_WRITE_TOKEN}" > ~/.npmrc
echo "@contentful:registry=https://npm.pkg.github.com" >> ~/.npmrc
- run: yarn build # This should not be needed, but without it it will not contain any files
- run: yarn version
- run: yarn publish
Expand All @@ -63,7 +67,9 @@ jobs:
template-preset: 'semantic-release'
- yarn_install
- vault/configure-lerna
- run: echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > ~/.npmrc
- run: |
echo "//npm.pkg.github.com/:_authToken=${GITHUB_PACKAGES_WRITE_TOKEN}" > ~/.npmrc
echo "@contentful:registry=https://npm.pkg.github.com" >> ~/.npmrc
- run: yarn build # This should not be needed, but without it it will not contain any files
- run: yarn version:canary
- run: yarn publish:canary
Expand Down
1 change: 1 addition & 0 deletions .contentful/vault-secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ services:
circleci:
policies:
- semantic-release
- packages-read
github-action:
policies:
- dependabot
37 changes: 32 additions & 5 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
require.resolve('@contentful/eslint-config-extension'),
require.resolve('@contentful/eslint-config-extension/react.js'),
require.resolve('@contentful/eslint-config-extension/typescript.js'),
'eslint:recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:@typescript-eslint/recommended',
],
plugins: ['eslint-plugin-import-helpers'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: ['react', 'react-hooks', '@typescript-eslint', 'eslint-plugin-import-helpers'],
rules: {
'react-hooks/exhaustive-deps': 'warn',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'import-helpers/order-imports': [
'warn',
{
Expand All @@ -14,6 +30,17 @@ module.exports = {
alphabetize: { order: 'asc', ignoreCase: true },
},
],
'react/react-in-jsx-scope': 'off'
'react/react-in-jsx-scope': 'off',
},
overrides: [
{
files: ['*.test.ts(x)', '*.spec.tsx(x)'],
rules: {
'@typescript-eslint/no-empty-function': 'off',
},
},
],
settings: {
react: { version: 'detect' },
},
};
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ registries:
type: npm-registry
url: https://registry.npmjs.org
token: '${{secrets.NPM_REGISTRY_REGISTRY_NPMJS_ORG_TOKEN}}'
npm-github:
type: npm-registry
url: https://npm.pkg.github.com
token: ${{secrets.NPM_REGISTRY_REGISTRY_GH_ORG_TOKEN}}

updates:
- package-ecosystem: npm
Expand All @@ -21,6 +25,7 @@ updates:
prefix: chore
registries:
- npm-registry-registry-npmjs-org
- npm-github
ignore:
# https://github.com/lerna/lerna/issues/3765
- dependency-name: 'prettier'
Expand Down
23 changes: 23 additions & 0 deletions catalog-info.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: backstage.io/v1alpha1
kind: System
metadata:
name: live-preview
description: |
A Monorepo for all packages around the live preview SDK functionality (inspectorMode and live updates)
annotations:
circleci.com/project-slug: github/contentful/live-preview
github.com/project-slug: contentful/live-preview
backstage.io/source-location: url:https://github.com/contentful/live-preview/
spec:
type: library
lifecycle: production
owner: group:team-tolkien
---
apiVersion: backstage.io/v1alpha1
kind: Location
metadata:
name: live-preview-index
spec:
type: url
targets:
- ./packages/live-preview-sdk/catalog-info.yaml
2 changes: 1 addition & 1 deletion examples/next-13-app-router-ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"eslint": "8.47.0",
"eslint-config-next": "13.4.13",
"relative-deps": "1.0.7",
"vite": "4.4.12",
"vite": "4.5.2",
"typescript": "5.1.6"
}
}
22 changes: 15 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"license": "MIT",
"description": "Everything about content preview in contentful",
"homepage": "https://github.com/contentful/live-preview#readme",
"publishConfig": {
"registry": "https://npm.pkg.github.com/"
},
"repository": {
"type": "git",
"url": "git+https://github.com/contentful/live-preview.git"
Expand Down Expand Up @@ -33,17 +36,22 @@
},
"dependencies": {},
"devDependencies": {
"@commitlint/cli": "^18.0.0",
"@commitlint/config-conventional": "^18.0.0",
"@contentful/eslint-config-extension": "0.4.3",
"@commitlint/cli": "18.6.0",
"@commitlint/config-conventional": "18.6.0",
"@typescript-eslint/eslint-plugin": "6.20.0",
"@typescript-eslint/parser": "6.20.0",
"commitizen": "4.3.0",
"concurrently": "8.2.2",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-import-helpers": "^1.2.1",
"husky": "^8.0.3",
"eslint": "8.56.0",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-import-helpers": "1.3.1",
"eslint-plugin-react": "7.33.2",
"eslint-plugin-react-hooks": "4.6.0",
"husky": "^9.0.6",
"lerna": "^8.0.0",
"lint-staged": "^15.0.1",
"prettier": "2.8.8"
"prettier": "3.2.4",
"typescript": "5.3.3"
},
"lint-staged": {
"*.{t,j}s?(x)": [
Expand Down
49 changes: 49 additions & 0 deletions packages/live-preview-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,59 @@ All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [3.0.0-alpha.2](https://github.com/contentful/live-preview/compare/@contentful/[email protected]...@contentful/[email protected]) (2024-01-19)
## [2.17.3](https://github.com/contentful/live-preview/compare/@contentful/[email protected]...@contentful/[email protected]) (2024-02-05)

**Note:** Version bump only for package @contentful/live-preview





## [2.17.2](https://github.com/contentful/live-preview/compare/@contentful/[email protected]...@contentful/[email protected]) (2024-01-26)

**Note:** Version bump only for package @contentful/live-preview





## [2.17.1](https://github.com/contentful/live-preview/compare/@contentful/[email protected]...@contentful/[email protected]) (2024-01-26)


### Bug Fixes

* pass experimental flags from LivePreviewProvider [TOL-1711] ([#525](https://github.com/contentful/live-preview/issues/525)) ([b9e4bf3](https://github.com/contentful/live-preview/commit/b9e4bf374999d10729ec57f8c4d950862528e5cf))





# [2.17.0](https://github.com/contentful/live-preview/compare/@contentful/[email protected]...@contentful/[email protected]) (2024-01-26)


### Features

* recognise auto-tagged elements [TOL-1711] ([#523](https://github.com/contentful/live-preview/issues/523)) ([f40704a](https://github.com/contentful/live-preview/commit/f40704aeb10a2c2749402e6fb47c52af85775afe))





## [2.16.1](https://github.com/contentful/live-preview/compare/@contentful/[email protected]...@contentful/[email protected]) (2024-01-22)

**Note:** Version bump only for package @contentful/live-preview





# [2.16.0](https://github.com/contentful/live-preview/compare/@contentful/[email protected]...@contentful/[email protected]) (2024-01-22)


### Features

* restore unsub logic ([7161b56](https://github.com/contentful/live-preview/commit/7161b560af5b4d1ca832ad26cc8a34f6796bc0fd))
* setup gh packages [TOL-1702] ([#512](https://github.com/contentful/live-preview/issues/512)) ([21128c9](https://github.com/contentful/live-preview/commit/21128c9d022a6994fda25a8fd17971ce5d13e735))



Expand All @@ -28,6 +76,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline


# [2.15.0-alpha.15](https://github.com/contentful/live-preview/compare/@contentful/[email protected]...@contentful/[email protected]) (2024-01-18)
## [2.15.2](https://github.com/contentful/live-preview/compare/@contentful/[email protected]...@contentful/[email protected]) (2024-01-22)

**Note:** Version bump only for package @contentful/live-preview

Expand Down
14 changes: 14 additions & 0 deletions packages/live-preview-sdk/catalog-info.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: live-preview
description: |
JavaScript library for Contentful's live preview functionality (inspectorMode and live updates)
annotations:
circleci.com/project-slug: github/contentful/live-preview
github.com/project-slug: contentful/live-preview
backstage.io/source-location: url:https://github.com/contentful/live-preview/tree/main/packages/live-preview-sdk
spec:
type: library
lifecycle: production
owner: group:team-tolkien
6 changes: 4 additions & 2 deletions packages/live-preview-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,14 @@
"dependencies": {
"@contentful/rich-text-types": "^16.2.0",
"flatted": "^3.2.9",
"@contentful/visual-sdk": "^1.0.0-alpha.34",
YvesRijckaert marked this conversation as resolved.
Show resolved Hide resolved
"@vercel/stega": "^0.1.0",
"graphql-tag": "^2.12.6",
"json-pointer": "^0.6.2",
"lodash.isequal": "^4.5.0"
},
"devDependencies": {
"@testing-library/react": "14.1.2",
"@testing-library/react": "14.2.1",
"@types/json-pointer": "^1.0.34",
"@types/lodash.isequal": "^4.5.6",
"@types/node": "^20.1.0",
Expand All @@ -61,7 +63,7 @@
"contentful": "^10.3.4",
"contentful-management": "^11.0.1",
"graphql": "^16.6.0",
"jsdom": "^23.0.0",
"jsdom": "^24.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"type-fest": "^4.0.0",
Expand Down
Loading
Loading