Skip to content

Commit ba866e8

Browse files
Merge pull request #499 from contentstack/VB-448
fix: remove integrity attribute from script tag and update copyright year in `main.mustache`
2 parents b223988 + 2305f45 commit ba866e8

File tree

5 files changed

+6
-34
lines changed

5 files changed

+6
-34
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ npm install @contentstack/live-preview-utils
1515
Alternatively, if you want to include the package directly in your website HTML code, use the following command:
1616

1717
```html
18-
<script type='module' integrity='sha384-b6G+ggU20rGxqCqsgaS6zludFgj5N11xsuXhMEIARMuQY2PtyDS04TU0H5goP+32' crossorigin="anonymous">
18+
<script type='module' crossorigin="anonymous">
1919
import ContentstackLivePreview from 'https://esm.sh/@contentstack/live-preview-utils@4.0.1';
2020
2121
ContentstackLivePreview.init({
@@ -51,7 +51,7 @@ ContentstackLivePreview.init({
5151

5252
MIT License
5353

54-
Copyright © 2024 [Contentstack](https://www.contentstack.com/). All Rights Reserved
54+
Copyright © 2021-2025 [Contentstack](https://www.contentstack.com/). All Rights Reserved
5555

5656
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5757

main.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ npm install @contentstack/live-preview-utils
1515
Alternatively, if you want to include the package directly in your website HTML code, use the following command:
1616

1717
```html
18-
<script type='module' integrity='{{integrity}}' crossorigin="anonymous">
18+
<script type='module' crossorigin="anonymous">
1919
import ContentstackLivePreview from 'https://esm.sh/@contentstack/live-preview-utils@{{packageVersion}}';
2020
2121
ContentstackLivePreview.init({
@@ -51,7 +51,7 @@ ContentstackLivePreview.init({
5151

5252
MIT License
5353

54-
Copyright © 2024 [Contentstack](https://www.contentstack.com/). All Rights Reserved
54+
Copyright © 2021-{{currentYear}} [Contentstack](https://www.contentstack.com/). All Rights Reserved
5555

5656
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5757

mustache.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
11
// index.js
22
// import { render } from 'mustache';
33
import * as mustache from 'mustache';
4-
import { readFile, readFileSync, writeFileSync } from 'fs';
4+
import { readFile, writeFileSync } from 'fs';
55
import packageJson from "./package.json" assert { type: "json" };
6-
import ssri from 'ssri';
76
const MUSTACHE_MAIN_DIR = './main.mustache';
8-
const fileContent = readFileSync('./dist/modern/index.js');
9-
const integrity = ssri.fromData(fileContent, { algorithms: ['sha384'] });
107
/**
118
* DATA is the object that contains all
129
* the data to be provided to Mustache
1310
* Notice the "name" and "date" property.
1411
*/
1512
const DATA = {
1613
packageVersion: packageJson.version,
17-
integrity: integrity.toString(),
14+
currentYear: new Date().getFullYear(),
1815
};
1916
function generateReadMe() {
2017

package-lock.json

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

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
"@types/mustache": "^4.2.2",
5757
"@types/react": "^18.2.57",
5858
"@types/react-dom": "^18.2.19",
59-
"@types/ssri": "^7.1.5",
6059
"@types/uuid": "^8.3.1",
6160
"@vitest/coverage-v8": "^2.1.2",
6261
"@vitest/ui": "^2.1.2",
@@ -71,7 +70,6 @@
7170
"jsdom": "^25.0.0",
7271
"prettier": "^3.3.3",
7372
"prettier-eslint": "^15.0.1",
74-
"ssri": "^11.0.0",
7573
"ts-node": "^10.9.2",
7674
"tsc": "^2.0.4",
7775
"tsup": "^8.0.1",

0 commit comments

Comments
 (0)