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

Migration/3.0 #46

Merged
merged 11 commits into from
Aug 8, 2024
Merged

Migration/3.0 #46

merged 11 commits into from
Aug 8, 2024

Conversation

jankapunkt
Copy link
Member

All necessary steps to make this Meteor 3.0 compatible

@jankapunkt
Copy link
Member Author

2.0.0-beta.0 is published

@denihs
Copy link

denihs commented Jul 18, 2024

After we release the official for this one, we can also release the official react-template-helper which uses this package.

@jankapunkt
Copy link
Member Author

@denihs I tried to publish but I get some typescript errors (although I didn't change anything in the code).

Here is the full output:

Here is the full error log
$ meteor publish --release 3.0.1
tmeasday:check-npm-versions: updating npm dependencies -- semver...
[zodern:types] => Cleaning old generated types
[zodern:types] => Generating package type declaration files
node_modules/@types/meteor/mongo.d.ts:268:46 - error TS2344: Type 'T' does not satisfy the constraint '{ [key: string]: any; }'.

268             rawCollection(): MongoCollection<T>;
                                                 ~

  node_modules/@types/meteor/mongo.d.ts:202:30
    202         interface Collection<T, U = T> {
                                     ~
    This type parameter might need an `extends { [key: string]: any; }` constraint.

node_modules/@types/mongodb/index.d.ts:58:74 - error TS2724: '"bson"' has no exported member named 'ObjectID'. Did you mean 'ObjectId'?

58 export { Binary, DBRef, Decimal128, Double, Int32, Long, MaxKey, MinKey, ObjectID, ObjectId, Timestamp } from "bson";
                                                                            ~~~~~~~~

  node_modules/bson/bson.d.ts:1237:22
    1237 export declare class ObjectId extends BSONValue {
                              ~~~~~~~~
    'ObjectId' is declared here.

node_modules/@types/mongodb/index.d.ts:1198:45 - error TS2344: Type 'TSchema' does not satisfy the constraint '{ [key: string]: any; }'.

1198         callback?: MongoCallback<Collection<TSchema>>,
                                                 ~~~~~~~

  node_modules/@types/mongodb/index.d.ts:1196:16
    1196     collection<TSchema = DefaultSchema>(
                        ~~~~~~~~~~~~~~~~~~~~~~~
    This type parameter might need an `extends { [key: string]: any; }` constraint.

node_modules/@types/mongodb/index.d.ts:1199:19 - error TS2344: Type 'TSchema' does not satisfy the constraint '{ [key: string]: any; }'.

1199     ): Collection<TSchema>;
                       ~~~~~~~

  node_modules/@types/mongodb/index.d.ts:1196:16
    1196     collection<TSchema = DefaultSchema>(
                        ~~~~~~~~~~~~~~~~~~~~~~~
    This type parameter might need an `extends { [key: string]: any; }` constraint.

node_modules/@types/mongodb/index.d.ts:1203:45 - error TS2344: Type 'TSchema' does not satisfy the constraint '{ [key: string]: any; }'.

1203         callback?: MongoCallback<Collection<TSchema>>,
                                                 ~~~~~~~

  node_modules/@types/mongodb/index.d.ts:1200:16
    1200     collection<TSchema = DefaultSchema>(
                        ~~~~~~~~~~~~~~~~~~~~~~~
    This type parameter might need an `extends { [key: string]: any; }` constraint.

node_modules/@types/mongodb/index.d.ts:1204:19 - error TS2344: Type 'TSchema' does not satisfy the constraint '{ [key: string]: any; }'.

1204     ): Collection<TSchema>;
                       ~~~~~~~

  node_modules/@types/mongodb/index.d.ts:1200:16
    1200     collection<TSchema = DefaultSchema>(
                        ~~~~~~~~~~~~~~~~~~~~~~~
    This type parameter might need an `extends { [key: string]: any; }` constraint.

node_modules/@types/mongodb/index.d.ts:1244:96 - error TS2344: Type 'TSchema' does not satisfy the constraint '{ [key: string]: any; }'.

1244     createCollection<TSchema = DefaultSchema>(name: string, callback: MongoCallback<Collection<TSchema>>): void;
                                                                                                    ~~~~~~~

  node_modules/@types/mongodb/index.d.ts:1244:22
    1244     createCollection<TSchema = DefaultSchema>(name: string, callback: MongoCallback<Collection<TSchema>>): void;
                              ~~~~~~~~~~~~~~~~~~~~~~~
    This type parameter might need an `extends { [key: string]: any; }` constraint.

node_modules/@types/mongodb/index.d.ts:1248:27 - error TS2344: Type 'TSchema' does not satisfy the constraint '{ [key: string]: any; }'.

1248     ): Promise<Collection<TSchema>>;
                               ~~~~~~~

  node_modules/@types/mongodb/index.d.ts:1245:22
    1245     createCollection<TSchema = DefaultSchema>(
                              ~~~~~~~~~~~~~~~~~~~~~~~
    This type parameter might need an `extends { [key: string]: any; }` constraint.

node_modules/@types/mongodb/index.d.ts:1252:44 - error TS2344: Type 'TSchema' does not satisfy the constraint '{ [key: string]: any; }'.

1252         callback: MongoCallback<Collection<TSchema>>,
                                                ~~~~~~~

  node_modules/@types/mongodb/index.d.ts:1249:22
    1249     createCollection<TSchema = DefaultSchema>(
                              ~~~~~~~~~~~~~~~~~~~~~~~
    This type parameter might need an `extends { [key: string]: any; }` constraint.

node_modules/@types/mongodb/index.d.ts:1384:44 - error TS2344: Type 'TSchema' does not satisfy the constraint '{ [key: string]: any; }'.

1384         callback: MongoCallback<Collection<TSchema>>,
                                                ~~~~~~~

  node_modules/@types/mongodb/index.d.ts:1381:22
    1381     renameCollection<TSchema = DefaultSchema>(
                              ~~~~~~~~~~~~~~~~~~~~~~~
    This type parameter might need an `extends { [key: string]: any; }` constraint.

node_modules/@types/mongodb/index.d.ts:1390:27 - error TS2344: Type 'TSchema' does not satisfy the constraint '{ [key: string]: any; }'.

1390     ): Promise<Collection<TSchema>>;
                               ~~~~~~~

  node_modules/@types/mongodb/index.d.ts:1386:22
    1386     renameCollection<TSchema = DefaultSchema>(
                              ~~~~~~~~~~~~~~~~~~~~~~~
    This type parameter might need an `extends { [key: string]: any; }` constraint.

node_modules/@types/mongodb/index.d.ts:1395:44 - error TS2344: Type 'TSchema' does not satisfy the constraint '{ [key: string]: any; }'.

1395         callback: MongoCallback<Collection<TSchema>>,
                                                ~~~~~~~

  node_modules/@types/mongodb/index.d.ts:1391:22
    1391     renameCollection<TSchema = DefaultSchema>(
                              ~~~~~~~~~~~~~~~~~~~~~~~
    This type parameter might need an `extends { [key: string]: any; }` constraint.

node_modules/@types/mongodb/index.d.ts:2559:21 - error TS2344: Type 'T' does not satisfy the constraint '{ [key: string]: any; }'.

2559     ): ChangeStream<T>;
                         ~

  node_modules/@types/mongodb/index.d.ts:2556:11
    2556     watch<T = TSchema>(
                   ~~~~~~~~~~~
    This type parameter might need an `extends { [key: string]: any; }` constraint.

node_modules/@types/mongodb/index.d.ts:2560:111 - error TS2344: Type 'T' does not satisfy the constraint '{ [key: string]: any; }'.

2560     watch<T = TSchema>(options?: ChangeStreamOptions & { session?: ClientSession | undefined }): ChangeStream<T>;
                                                                                                                   ~

  node_modules/@types/mongodb/index.d.ts:2560:11
    2560     watch<T = TSchema>(options?: ChangeStreamOptions & { session?: ClientSession | undefined }): ChangeStream<T>;
                   ~~~~~~~~~~~
    This type parameter might need an `extends { [key: string]: any; }` constraint.

node_modules/@types/mongodb/index.d.ts:2911:30 - error TS2344: Type 'TSchema' does not satisfy the constraint '{ _id?: any; }'.

2911         document: OptionalId<TSchema>;
                                  ~~~~~~~

  node_modules/@types/mongodb/index.d.ts:2909:41
    2909 export type BulkWriteInsertOneOperation<TSchema> = {
                                                 ~~~~~~~
    This type parameter might need an `extends { _id?: any; }` constraint.


Found 15 errors in 2 files.

Errors  Files
     1  node_modules/@types/meteor/mongo.d.ts:268
    14  node_modules/@types/mongodb/index.d.ts:58
Ran:  npx --no-install tsc --declaration --emitDeclarationOnly --noEmit false --declarationDir /home/jankapunkt/dev/github/mcp/check-npm-versions/__types --declarationMap --rootDir ./
Generating package types failed               

package.json Outdated Show resolved Hide resolved
@jankapunkt
Copy link
Member Author

It seems to have been published but I still got an error:

error log
$ meteor publish --release 3.0.1
tmeasday:check-npm-versions: updating npm dependencies -- semver...
[zodern:types] => Cleaning old generated types
[zodern:types] => Generating package type declaration files
[zodern:types] => Uninstalling package's dev dependencies
npm WARN config production Use `--omit=dev` instead.
npm WARN old lockfile 
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile 
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile 
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@eslint/config-array@0.17.1',
npm WARN EBADENGINE   required: { node: '^18.18.0 || ^20.9.0 || >=21.1.0' },
npm WARN EBADENGINE   current: { node: 'v21.0.0', npm: '10.4.0' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@eslint/eslintrc@3.1.0',
npm WARN EBADENGINE   required: { node: '^18.18.0 || ^20.9.0 || >=21.1.0' },
npm WARN EBADENGINE   current: { node: 'v21.0.0', npm: '10.4.0' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@eslint/js@9.7.0',
npm WARN EBADENGINE   required: { node: '^18.18.0 || ^20.9.0 || >=21.1.0' },
npm WARN EBADENGINE   current: { node: 'v21.0.0', npm: '10.4.0' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@eslint/object-schema@2.1.4',
npm WARN EBADENGINE   required: { node: '^18.18.0 || ^20.9.0 || >=21.1.0' },
npm WARN EBADENGINE   current: { node: 'v21.0.0', npm: '10.4.0' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'eslint@9.7.0',
npm WARN EBADENGINE   required: { node: '^18.18.0 || ^20.9.0 || >=21.1.0' },
npm WARN EBADENGINE   current: { node: 'v21.0.0', npm: '10.4.0' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'eslint-scope@8.0.2',
npm WARN EBADENGINE   required: { node: '^18.18.0 || ^20.9.0 || >=21.1.0' },
npm WARN EBADENGINE   current: { node: 'v21.0.0', npm: '10.4.0' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'eslint-visitor-keys@4.0.0',
npm WARN EBADENGINE   required: { node: '^18.18.0 || ^20.9.0 || >=21.1.0' },
npm WARN EBADENGINE   current: { node: 'v21.0.0', npm: '10.4.0' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'espree@10.1.0',
npm WARN EBADENGINE   required: { node: '^18.18.0 || ^20.9.0 || >=21.1.0' },
npm WARN EBADENGINE   current: { node: 'v21.0.0', npm: '10.4.0' }
npm WARN EBADENGINE }

up to date, audited 1 package in 20s

found 0 vulnerabilities
=> Linted your package. No linting errors.    
Published tmeasday:check-npm-versions@2.0.0-rc300.1.
[zodern:types] => Re-installing package's dev dependencies
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @typescript-eslint/type-utils@7.17.0
npm WARN Found: eslint@9.7.0
npm WARN node_modules/eslint
npm WARN   dev eslint@"^9.7.0" from the root project
npm WARN   1 more (@eslint-community/eslint-utils)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer eslint@"^8.56.0" from @typescript-eslint/type-utils@7.17.0
npm WARN node_modules/@typescript-eslint/type-utils
npm WARN   @typescript-eslint/type-utils@"7.17.0" from @typescript-eslint/eslint-plugin@7.17.0
npm WARN   node_modules/typescript-eslint/node_modules/@typescript-eslint/eslint-plugin
npm WARN 
npm WARN Conflicting peer dependency: eslint@8.57.0
npm WARN node_modules/eslint
npm WARN   peer eslint@"^8.56.0" from @typescript-eslint/type-utils@7.17.0
npm WARN   node_modules/@typescript-eslint/type-utils
npm WARN     @typescript-eslint/type-utils@"7.17.0" from @typescript-eslint/eslint-plugin@7.17.0
npm WARN     node_modules/typescript-eslint/node_modules/@typescript-eslint/eslint-plugin
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @typescript-eslint/utils@7.17.0
npm WARN Found: eslint@9.7.0
npm WARN node_modules/eslint
npm WARN   dev eslint@"^9.7.0" from the root project
npm WARN   1 more (@eslint-community/eslint-utils)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer eslint@"^8.56.0" from @typescript-eslint/utils@7.17.0
npm WARN node_modules/@typescript-eslint/utils
npm WARN   @typescript-eslint/utils@"7.17.0" from @typescript-eslint/type-utils@7.17.0
npm WARN   node_modules/@typescript-eslint/type-utils
npm WARN   2 more (typescript-eslint, @typescript-eslint/eslint-plugin)
npm WARN 
npm WARN Conflicting peer dependency: eslint@8.57.0
npm WARN node_modules/eslint
npm WARN   peer eslint@"^8.56.0" from @typescript-eslint/utils@7.17.0
npm WARN   node_modules/@typescript-eslint/utils
npm WARN     @typescript-eslint/utils@"7.17.0" from @typescript-eslint/type-utils@7.17.0
npm WARN     node_modules/@typescript-eslint/type-utils
npm WARN     2 more (typescript-eslint, @typescript-eslint/eslint-plugin)
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: typescript-eslint@7.17.0
npm ERR! Found: eslint@9.7.0
npm ERR! node_modules/eslint
npm ERR!   dev eslint@"^9.7.0" from the root project
npm ERR!   peer eslint@"^6.0.0 || ^7.0.0 || >=8.0.0" from @eslint-community/eslint-utils@4.4.0
npm ERR!   node_modules/@eslint-community/eslint-utils
npm ERR!     @eslint-community/eslint-utils@"^4.4.0" from @typescript-eslint/utils@7.17.0
npm ERR!     node_modules/@typescript-eslint/utils
npm ERR!       @typescript-eslint/utils@"7.17.0" from @typescript-eslint/type-utils@7.17.0
npm ERR!       node_modules/@typescript-eslint/type-utils
npm ERR!         @typescript-eslint/type-utils@"7.17.0" from @typescript-eslint/eslint-plugin@7.17.0
npm ERR!         node_modules/typescript-eslint/node_modules/@typescript-eslint/eslint-plugin
npm ERR!       2 more (typescript-eslint, @typescript-eslint/eslint-plugin)
npm ERR!     @eslint-community/eslint-utils@"^4.2.0" from eslint@9.7.0
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^8.56.0" from typescript-eslint@7.17.0
npm ERR! node_modules/typescript-eslint
npm ERR!   dev typescript-eslint@"^7.17.0" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: eslint@8.57.0
npm ERR! node_modules/eslint
npm ERR!   peer eslint@"^8.56.0" from typescript-eslint@7.17.0
npm ERR!   node_modules/typescript-eslint
npm ERR!     dev typescript-eslint@"^7.17.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! 
npm ERR! For a full report see:
npm ERR! /home/jankapunkt/.npm/_logs/2024-07-25T08_37_14_559Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: /home/jankapunkt/.npm/_logs/2024-07-25T08_37_14_559Z-debug-0.log

StorytellerCZ
StorytellerCZ previously approved these changes Jul 25, 2024
@jankapunkt
Copy link
Member Author

Finally fixed npm dependencies, lint and ci. If @denihs reports no issues with the react-template-helper then I will merge this and release 2.0.0.

@jankapunkt jankapunkt requested a review from StorytellerCZ July 25, 2024 18:32
@denihs
Copy link

denihs commented Jul 29, 2024

I think you can go ahead!

@jankapunkt jankapunkt requested a review from denihs August 8, 2024 11:09
@jankapunkt jankapunkt merged commit 1431ce9 into master Aug 8, 2024
3 checks passed
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.

4 participants