Skip to content

updating the tsc build process to better support both ESM and commonJS #226

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

Merged
merged 32 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
263bea3
default charset to utf-8 since that is the default return for getCharset
jshemas Jun 18, 2024
fca7153
buffer is type ArrayBuffer
jshemas Jun 18, 2024
d5ea1f3
clean up http-equiv charset logic
jshemas Jun 18, 2024
10e4746
default options.url to empty string for the Origin header
jshemas Jun 18, 2024
6f61810
refactor how customMetaTags works. they are no longer inserted into t…
jshemas Jun 19, 2024
e1007bd
add missing props to OgObjectInteral
jshemas Jun 19, 2024
15cdc0d
removeNestedUndefinedValues will return OgObjectInteral type
jshemas Jun 19, 2024
ea309f2
adding a Fields type so now fieldName is just a keyof OgObjectInteral
jshemas Jun 19, 2024
6b42c5e
move where success flag is set and fix metaFields types
jshemas Jun 19, 2024
0024d50
setting these fields multiple flag to false because they are not used…
jshemas Jun 19, 2024
99c5d0d
setting the mediaMapperProperties to just be string[] and syncing up …
jshemas Jun 19, 2024
917fc97
updating extract to treat mediaMapperProperties fields as always a ar…
jshemas Jun 19, 2024
0dd6d22
update ts compilerOptions to match https://www.npmjs.com/package/@tsc…
jshemas Jun 19, 2024
c325250
remove the dist folder from version control
jshemas Jun 19, 2024
45c0df1
eslint: Use an `interface` instead of a `type`
jshemas Jun 19, 2024
01cb0d8
eslint: Prefer using nullish coalescing operator (`??`) instead of a …
jshemas Jun 19, 2024
1a75050
eslint: A record is preferred over an index signature
jshemas Jun 20, 2024
ee3a8e5
eslint: Use 'String#startsWith' method instead
jshemas Jun 20, 2024
4717763
eslint: Prefer using an optional chain expression instead, as it's mo…
jshemas Jun 20, 2024
91afaa2
turn on @typescript-eslint recommended and stylistic rule sets
jshemas Jun 20, 2024
d51ba2a
updating the tsc build process to better support both ESM and commonJS
jshemas Jun 20, 2024
c275306
start testing node22 in the ci pipeline
jshemas Jun 20, 2024
9fa71cd
updating dependencies
jshemas Jun 20, 2024
b5c8f77
6.6.0
jshemas Jun 20, 2024
fd055db
send back error.result on failed api calls
jshemas Jun 20, 2024
0f5a9c6
adding build:declaration with its own tsconfig file so we can have be…
jshemas Jun 23, 2024
e1e3155
moving types back into the exports block
jshemas Jun 23, 2024
6eb0061
do not need the index.ts in the package
jshemas Jun 23, 2024
d7008a9
adding a tsconfig.build.json so we can set the module and moduleResol…
jshemas Jun 23, 2024
900b633
adding index.ts back into the package
jshemas Jun 23, 2024
088583b
updating changelog
jshemas Jun 24, 2024
e87e976
updating devDependencies
jshemas Jun 24, 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
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ coverage/
dist/
node_modules/
example/
types/
10 changes: 9 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"extends": [
"airbnb-base",
"airbnb-typescript/base",
"plugin:promise/recommended"
"plugin:promise/recommended",
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked"
],
"plugins": [
"promise"
Expand All @@ -11,6 +13,12 @@
"project": "./tsconfig.json"
},
"rules": {
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-unsafe-argument": "warn",
"@typescript-eslint/no-unsafe-assignment": "warn",
"@typescript-eslint/no-unsafe-call": "warn",
"@typescript-eslint/no-unsafe-member-access": "warn",
"@typescript-eslint/no-unsafe-return": "warn",
"import/no-named-as-default": 0,
"max-len": ["error", {
"code": 120,
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
node-version:
- 18
- 20
- 22
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
Expand All @@ -30,6 +31,8 @@ jobs:
run: npm run eslint
- name: Running Typescript
run: npm run build
- name: Running Typescript Declaration
run: npm run build:declaration
- name: Unit Testing
run: npm run mocha:unit
- name: Integration Testing
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ pids
logs
results
node_modules
dist

.nyc_output/
coverage/
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Change Log

## 6.6.0

- Updating the `tsc` build process to better support both `ESM` and `commonJS`
- Fixed issue where some meta tags would always come back as array even thought there was only ever one meta tag.
- Removed the `dist` folder from version control
- Start running node22 in the CI pipeline
- General typescript clean up
- Example service will only return the `result` of OGS now
- Updating dependencies

## 6.5.2

- adding a new favicon fallback using appIcon
Expand Down
53 changes: 0 additions & 53 deletions dist/index.js

This file was deleted.

69 changes: 0 additions & 69 deletions dist/lib/extract.js

This file was deleted.

Loading
Loading