Skip to content

Commit

Permalink
Merge pull request #231 from jshemas/commonjs-fix
Browse files Browse the repository at this point in the history
adding main and types back into the package.json
  • Loading branch information
jshemas authored Jun 29, 2024
2 parents d7fe9ac + 5e897d1 commit a819cd2
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## 6.6.2

- Fixed issue with `package.json` `exports` was not working in `CommonJs` projects.

## 6.6.1

- Use `node16` for `module`/`moduleResolution` ESM build
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
{
"name": "open-graph-scraper",
"description": "Node.js scraper module for Open Graph and Twitter Card info",
"version": "6.6.1",
"version": "6.6.2",
"license": "MIT",
"main": "./dist/cjs/index.js",
"types": "./types/index.d.ts",
"exports": {
".": {
"require": "./dist/cjs/index.js",
"types": "./types/index.d.ts",
"import": "./dist/esm/index.js",
"types": "./types/index.d.ts"
"require": "./dist/cjs/index.js"
}
},
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/basic.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,8 @@ describe('basic', function () {
});
});

it('vimeo.com should return open graph data', function () {
// vimeo.com is now blocking OGS even when using the "User Agent" header
it.skip('vimeo.com should return open graph data', function () {
return ogsRequire({ url: 'https://vimeo.com/232889838' }).then(function ({ error, result, response }) {
console.log('error:', error);
console.log('result:', result);
Expand Down
1 change: 1 addition & 0 deletions tests/unit/static.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ describe('static check meta tags', function () {
it('jsonLD', function () {
const metaHTML = `<html><head>
<script type="application/ld+json">{"foo":"bar"}</script>
<script type="application/ld+json"></script>
</head></html>`;

mockAgent.get('http://www.test.com')
Expand Down

0 comments on commit a819cd2

Please sign in to comment.