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

Release 2.2.5 #1072

Merged
merged 24 commits into from
Aug 3, 2024
Merged

Release 2.2.5 #1072

merged 24 commits into from
Aug 3, 2024

Conversation

smwhr
Copy link
Collaborator

@smwhr smwhr commented Jul 31, 2024

Checklist

  • The new code additions passed the tests (npm test).
  • The linter ran and found no issues (npm run-script lint).

Description

Tries to fix issues raised on github and Discord :

Fixes imports :
from 'inkjs' or require('inkjs'): Story and Inklist
from 'inkjs/full' or require('inkjs/full') : same as above + Compiler and co for javascript
from 'inkjs/types' : same as above but typed for typescript (pain to use in pure JS for reasons)
from 'inkjs/compiler/Deeply/Nested/Thing' : works again

Also :

  • updated documentation
  • merged upgrade to TS5.0 by @maetl
  • put the inkjs-compiler script in bin to be executed
  • upgraded the ink.js files in the browser templates to test if I didn't break anything
  • added more varied way of importing in the typescript templates also

maetl and others added 15 commits April 6, 2024 11:07
Incorporates various changes to package dependencies, Rollup and TS
config in order to bump up the main TypeScript version to 5.4.4
Fixes `super` lookups that weren’t able to be resolved due to TypeScript
not recognising the context in arrow functions declared as properties
on the class or constructor.

See: https://github.com/basarat/typescript-book/blob/master/docs/arrow-functions.md#tip-arrow-functions-and-inheritance
Might be a good idea to generalise this record type for reuse throughout
this module rather than declaring everything repeatedly inline.
The global `jasmine` API has been removed from Jest with the new test
runner `jest-circus` introduced in v27–v29. While possible to import the
legacy Jasmine package, it seemed to be more robust to upgrade to the
`jest.fn` API which behaves exactly the same as `jasmine.createSpy`.

The main difference is the `callThrough()` method in Jasmine spies. This
behaviour is the default for `jest.fn()`, so the upgrade works as-is.
This prevents the linter from blowing up with hundreds of notices about
trailing commas in multi-line function arg lists that don’t match the
style of the codebase.
@smwhr smwhr changed the title Fixe 2.2.4 importing errors Fix 2.2.4 importing errors Jul 31, 2024
ink.d.mts Outdated Show resolved Hide resolved
ink.d.mts Outdated Show resolved Hide resolved
package.json Outdated
"description": "A javascript port of inkle's ink scripting language (http://www.inklestudios.com/ink/)",
"type": "commonjs",
"main": "dist/ink-full.js",
"types": "ink.d.ts",
"files": ["src/engine","src/compiler","ink.d.ts", "ink.d.mts","script/inkjs-compiler.ts", "dist"],
"files": ["engine","compiler","ink.d.ts", "ink.d.mts","script/inkjs-compiler.ts", "dist"],
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mistakenly exported the source files instead of the built files, sorry about that !

ink.d.ts Outdated Show resolved Hide resolved
"test:javascript:dist": "INK_TEST=dist jest --config='jest.config.javascript.js'",
"test:javascript:legacy": "INK_TEST=legacy jest --config='jest.config.javascript.js'",
"test:compileFiles": "node src/tests/compile.js",
"build": "tsc -p ./ && rollup -c",
"lint": "eslint 'src/**/*.ts'",
"lint:fix": "npm run lint -- --fix",
"watch": "tsc -p ./ && rollup -c -w",
"prepare": "npm run build"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prepare was triggered all the time, I suggest we just be redondant in the run test steps.

@smwhr smwhr changed the title Fix 2.2.4 importing errors Release 2.2.5 Aug 3, 2024
@smwhr smwhr merged commit d39664b into master Aug 3, 2024
1 check passed
@smwhr smwhr deleted the jz/better-typings branch August 3, 2024 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants