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

chore: update season-1 branch #260

Closed
wants to merge 57 commits into from
Closed

Conversation

admon84
Copy link
Member

@admon84 admon84 commented Aug 11, 2024

Brief Description

Season #7 appears to use @screeps/mod-season1 with a new world map.

I updated the season-1 branch with latest master.

To view the types for Season 1 (and Season 7), compare the updated season-1 branch to master:

 
 

Checklists

  • Test passed
  • Coding style (indentation, etc)
  • Edits have been made to src/ files not index.d.ts
  • Run npm run compile to update index.d.ts

justjavac and others added 30 commits December 7, 2020 14:01
Fix documentation for `Deposit.depositType`
* Update Creep.build
* update index.d.ts
- Added `StructureInvaderCore.Spawning`
- Updated `PIXEL_CPU_COST` constant to 10000
* Add support for type predicates
* correct mistake in generic type predicate
Just a simple typo fix in the Flag interface : `spawn` -> `flag`
Add notes for unreleased changes
Fix year in date for prior 3.2.2 release
Typescript 4.4 (currently in beta) provides support for distinguishing
whether or not optional parameters should be allowed to be sete to an
undefined value.

In order to indicate optional values that support being set to
undefined, ` | undefined` must explicitly be included in the type
definition.

Also fix some doc strings regarding default values for map/visual styles
- Update version number
- Update changelog
Make level optional on factory to match what is given for an unpowered factory.
Adds 204,205 to Unreleased section
Adds test for screepers#205
* clean up test and format
* Id only works for objects that has an id
* remove deprecated getObjectById
* fix Spawning constructor
The Typescript version has been set at 2.8 for a number of years and is
no longer supported by DefinitelyTyped. The latest release is 4.6.
Fixes new linting issues (stricter strings, no-for-in)
Updates dependencies
Replaces `dtslint` with `@definitelytyped/dtslint` in an effort to still
follow the DT repo structure which hasn't yet moved to eslint.
Unfortunately this triggers some audit rules.
Remove `concat` dependency in favor of directly using `fs` due to
security notice.
Also testing if husky is fixed
Husky was very old, now updated to version 7 and configured.
Adds new git hooks directory `.husky`
Updates `prepare` lifecycle hook to include installing Husky
Removes unused husky section from `package.json`
Updates project version number
Clarifies Screeps in README to refer to Screeps: World
* Added CommoditiesTypes and CommodityEntry to simplify reusing those types.

* Updated factory.produce to use the new CommoditiesTypes
Add missing 3.3.0 heading and new unrealeased updates
rougeayrn and others added 26 commits February 12, 2023 19:47
* Changed `LOOK_STRUCTURES` return type

Was `AllLookAtTypes.structure: Structure`, Now `AllLookAtTypes.structure: AnyStructure`.

* Ran `npm run dtslint`
* An instance of CostMatrix cannot be used with new.

JSON.stringify(new (new PathFinder.CostMatrix())());
Results in
TypeError: (intermediate value) is not a constructor
    at eval (eval at <anonymous> (_console1656190542011_0:1:46), <anonymous>:1:16)
    at _console1656190542011_0:1:46
    at _console1656190542011_0:1:60
    at Object.exports.evalCode (<runtime>:15336:71)
    at Object.exports.run (<runtime>:20819:41)

* Updated PathFinder.CostMatrix to be CostMatrixConstructor

* Move deserialize to CostMatrixConstructor

According to the docs, deserialize is a static method on Pathfinder.CostMatrix (the constructor), not instances.
https://docs.screeps.com/api/#PathFinder.CostMatrix.deserialize

* Add tests for updated PathFinder.CostMatrix

---------

Co-authored-by: Skyler Kehren <[email protected]>
* Create CI.yml

* chore: replace travis CI with github action CI

* fix: dtslint fixes
* changelog: add 3.3.1

* changelog: sort out unreleased changes

* chore: update package version to 3.3.1

* chore!: add Mofeng to maintainers
Mofeng's profile: https://github.com/DiamondMofeng
see DefinitelyTyped/DefinitelyTyped#64389
and DefinitelyTyped/DefinitelyTyped@dbbe88d
* MarkoSulamagi resigns from DT maintainer

DefinitelyTyped/DefinitelyTyped#64588

* update changelog about 3.3.2
* Mark Spawning.directions as optional

This property is only defined if it was passed as spawn options, or
it got set through `Spawn.spawning.setDirections`. Otherwise it'll be
`undefined` and the creep will default to `[TOP]`.

* Apply suggestions from code review

Co-authored-by: Mofeng <[email protected]>

---------

Co-authored-by: Mofeng <[email protected]>
…ilterOption` (screepers#238)

* test: add test cases

* fix: `FilterObject` should be `DeepPartial`

* fix: add non-narrowing filter function to FilterOptions

* feat: mark `filter` as optional

* fix: decoupling `FilterOption` and `FindConstant`

* test: add dtslint assertions

* test: add test for object and string style filter predicate
* fix: Room.getEventLog() may return string

* run dtslint

* docs: update changelog

---------

Co-authored-by: Wyatt Lipscomb <[email protected]>
* unlimited stores have no notion of free capacity

* test: add test cases for store definition

* docs: update changelog

* test: add test cases for `get*Capacity()`
when no resourceType is specified

---------
Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2.
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](isaacs/minimatch@v3.0.4...v3.1.2)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
…reepers#249)

The only one that's breaking is `INVADER_CORE_EXPAND_TIME` which is
keyed by the core's level now.
* feat: add RoomTerrain.getRawBuffer()

* fix: incorporate changes recommended by @DiamondMofend and update tests

* fix: replace TypedArray helper with inline type
* Fix lookForAtArea matrix result type.

* npm run dtslint

* Modify new test to explicitly match issue description

* Separate tests for default and explicit isArray=false

---------

Co-authored-by: Piotr Paulski <[email protected]>
…ing (screepers#255)

* Update Order interface in market.ts

Setting the type to ORDER_BUY | ORDER_SELL instead of string

* Updating index.d.ts

* test: add test for hardcoded string literal value
…#250)

* Game.map.describeExits returns null for non-existent rooms

* chore: add example for type `ExitsInformation`
* Update Game.market.deal documentation

* Fix long line for tests

* chore: keep comment the same as official doc
…eepers#259)

* chore: remove unused dependencies

* chore: upgrade ts to 5.5.0

* fix dtslint errors

* use `typescript-eslint` and `eslint-plugin-expect-type` instead of `dtslint`, `tslint`

* migrate to pnpm

* chore: add comment about eslint-plugin-expect-type

* chore: rm tslint from vscode extension recommendations
* No longer needed to prepend header and descriptions
@admon84 admon84 changed the title chore: update season-1 chore: update season-1 branch Aug 11, 2024
@DiamondMofeng
Copy link
Member

How about just creating a new branch?

@admon84
Copy link
Member Author

admon84 commented Aug 14, 2024

Yeah, that works. Looks like the season-7 branch was created so I'll close this

@admon84 admon84 closed this Aug 14, 2024
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.