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

🎁 2.0 Milestones【Breaking Change】 #1281

Open
iamkun opened this issue Dec 19, 2020 · 38 comments
Open

🎁 2.0 Milestones【Breaking Change】 #1281

iamkun opened this issue Dec 19, 2020 · 38 comments
Labels
Breaking Change discussion Further discussion help wanted Extra attention is needed 🚨 High Priority

Comments

@iamkun
Copy link
Owner

iamkun commented Dec 19, 2020

We want to make some changes to make Day.js modern and in a standard JS way.

And this would be a breaking change because of these changes below:

Make TypeScript definition the same behavior as JS code

Update types/index.d.ts to export default dayjs;

Mark the correct ES6 Module entry

Update package.json "module" to "esm/index", (won't introduce in "dayjs", see #1281 (comment))

Publish a new NPM package, maybe "dayjs-esm" to ship an ESM module with package.json module entry pointed to. ref #1242 (comment)

@iamkun iamkun added Breaking Change discussion Further discussion help wanted Extra attention is needed 🚨 High Priority labels Dec 19, 2020
@iamkun iamkun pinned this issue Dec 19, 2020
@iamkun
Copy link
Owner Author

iamkun commented Dec 19, 2020

I currently have some problem with 2. update TS definition.

In the current Day.js, while we import some plugin like isLeapYear, it will update the TS definition to add a new method .isLeapYear, so that TS could know that dayjs().isLeapYear is corrent.

checking this: https://github.com/iamkun/dayjs/blob/dev/types/plugin/isLeapYear.d.ts

However, after I changing types/index.d.ts to export default dayjs, the above code does not work at all.

I don't know TS much and need some help, pls.✋🏼

@g1eny0ung
Copy link
Contributor

g1eny0ung commented Dec 23, 2020

I currently have some problem with 2. update TS definition.

In the current Day.js, while we import some plugin like isLeapYear, it will update the TS definition to add a new method .isLeapYear, so that TS could know that dayjs().isLeapYear is corrent.

checking this: https://github.com/iamkun/dayjs/blob/dev/types/plugin/isLeapYear.d.ts

However, after I changing types/index.d.ts to export default dayjs, the above code does not work at all.

I don't know TS much and need some help, pls.✋🏼

Because the original type definitions use Named Exports (via export =) so everything in the dayjs namespace can be imported.

For Default Exports, it's needed to import by import default from because there only have one export. TS has no extra magic on ES Modules, just share its concept.

@TheThing
Copy link

TheThing commented Jan 4, 2021

I wanna point out, the recent typescript changes done in 1.10 actually broke in my project with the way that it was documented online on how to install/use dayjs in angular

import * as updateLocale from 'dayjs/plugin/updateLocale'
import * as relativeTime from 'dayjs/plugin/relativeTime'
import * as LocalizedFormat from 'dayjs/plugin/localizedFormat'
import * as dayjs from 'dayjs'
dayjs.extend(LocalizedFormat)
dayjs.extend(relativeTime)
dayjs.extend(updateLocale)
dayjs.locale('is')

Error: "export 'extend' (imported as 'dayjs') was not found in 'dayjs'

So there already has been breaking changes, especially with usage on typescript so might as well just push these changes over since people are gonna have to update their projects

@iamkun
Copy link
Owner Author

iamkun commented Jan 4, 2021

@TheThing said to hear this, however, seems in 1.10.x there's no typescript change as far as I cloud tell.

@bboydflo
Copy link

bboydflo commented Jan 4, 2021

I wanna point out, the recent typescript changes done in 1.10 actually broke in my project with the way that it was documented online on how to install/use dayjs in angular

import * as updateLocale from 'dayjs/plugin/updateLocale'
import * as relativeTime from 'dayjs/plugin/relativeTime'
import * as LocalizedFormat from 'dayjs/plugin/localizedFormat'
import * as dayjs from 'dayjs'
dayjs.extend(LocalizedFormat)
dayjs.extend(relativeTime)
dayjs.extend(updateLocale)
dayjs.locale('is')

Error: "export 'extend' (imported as 'dayjs') was not found in 'dayjs'

So there already has been breaking changes, especially with usage on typescript so might as well just push these changes over since people are gonna have to update their projects

@TheThing I have the same issue. did you fixed yours? How?

I tried something like this:

import dayjs, { extend } from 'dayjs'

@TheThing
Copy link

TheThing commented Jan 4, 2021

I wanna point out, the recent typescript changes done in 1.10 actually broke in my project with the way that it was documented online on how to install/use dayjs in angular

import * as updateLocale from 'dayjs/plugin/updateLocale'
import * as relativeTime from 'dayjs/plugin/relativeTime'
import * as LocalizedFormat from 'dayjs/plugin/localizedFormat'
import * as dayjs from 'dayjs'
dayjs.extend(LocalizedFormat)
dayjs.extend(relativeTime)
dayjs.extend(updateLocale)
dayjs.locale('is')

Error: "export 'extend' (imported as 'dayjs') was not found in 'dayjs'
So there already has been breaking changes, especially with usage on typescript so might as well just push these changes over since people are gonna have to update their projects

@TheThing I have the same issue. did you fixed yours? How?

I tried something like this:

import dayjs, { extend } from 'dayjs'

I just made the version in package.json hard value to the last known working version: 1.9.7 like so: "dayjs": "1.9.7",

Github diff image

If dayjs is gonna add breaking changes without increasing their major version, I might as well just lock the version :)

@TheThing
Copy link

TheThing commented Jan 4, 2021

@TheThing said to hear this, however, seems in 1.10.x there's no typescript change as far as I cloud tell.

According to 1.10.0 logs this was changed:

I jsut assumed that broke previous old typescript loading

@iamkun
Copy link
Owner Author

iamkun commented Jan 4, 2021

@TheThing said to hear this, however, seems in 1.10.x there's no typescript change as far as I cloud tell.

According to 1.10.0 logs this was changed:

I jsut assumed that broke previous old typescript loading

@TheThing
Sorry for the inconvenience.

This must be an unexpected change. But this still confused me, why a esm update leads to a typescript error. I'll need some time to check this out.

@TheThing
Copy link

TheThing commented Jan 4, 2021

@TheThing said to hear this, however, seems in 1.10.x there's no typescript change as far as I cloud tell.

According to 1.10.0 logs this was changed:

I jsut assumed that broke previous old typescript loading

@TheThing
Sorry for the inconvenience.

This must be an unexpected change. But this still confused me, why a esm update leads to a typescript error. I'll need some time to check this out.

lol, it was slightly annoying to find out my build was failling but what can you do :b

Also I ran a few tests and you are right, the problem is weird but it might have something to do with module detection and/or babel in angular where at least I am using it.

Comparing the output of this in node:

import * as dayjs from 'dayjs'

console.log(dayjs)

between both versions provide identical output:

PS D:\NFP\nfp\kisildalur> npm install dayjs@1.10.1
PS D:\NFP\nfp\kisildalur> node test.mjs
(node:4284) ExperimentalWarning: The ESM module loader is experimental.
[Module] {
  default: [Function: v] {
    extend: [Function (anonymous)],
    locale: [Function: D],
    isDayjs: [Function: m],
    unix: [Function (anonymous)],
    en: { name: 'en', weekdays: [Array], months: [Array] },
    Ls: { en: [Object] },
    p: {}
  }
}
PS D:\NFP\nfp\kisildalur> npm install dayjs@1.9.7
PS D:\NFP\nfp\kisildalur> node test.mjs
(node:14660) ExperimentalWarning: The ESM module loader is experimental.
[Module] {
  default: [Function: v] {
    extend: [Function (anonymous)],
    locale: [Function: D],
    isDayjs: [Function: m],
    unix: [Function (anonymous)],
    en: { name: 'en', weekdays: [Array], months: [Array] },
    Ls: { en: [Object] },
    p: {}
  }
}

However when running angular run or angular build, it will fail when 1.10.1 is installed:

import * as updateLocale from 'dayjs/plugin/updateLocale'
import * as relativeTime from 'dayjs/plugin/relativeTime'
import * as LocalizedFormat from 'dayjs/plugin/localizedFormat'
import * as dayjs from 'dayjs'
dayjs.extend(LocalizedFormat)
dayjs.extend(relativeTime)
dayjs.extend(updateLocale)
dayjs.locale('is')
ERROR in ./app/app/app.module.ts 98:0-12
"export 'extend' (imported as 'dayjs') was not found in 'dayjs'
"export 'extend' (imported as 'dayjs') was not found in 'dayjs'
ERROR in ./app/app/app.module.ts 100:0-12
ERROR in ./app/app/app.module.ts 101:0-12
"export 'locale' (imported as 'dayjs') was not found in 'dayjs'
ERROR in ./app/app/app.module.ts 102:0-18
"export 'updateLocale' (imported as 'dayjs') was not found in 'dayjs'

so I decided to check the output of both from the angular build by doing something like this and checking the output in browser as opposed to in node like I did previously:

import * as dayjs from 'dayjs'
console.log(dayjs)

That's when we get a difference:

difference

@TheThing
Copy link

TheThing commented Jan 4, 2021

More fun facts.

This doesn't work in 1.10.1 in angular:

import dayjs from 'dayjs'
ERROR in app/app/app.module.ts:16:8 - error TS1259: Module '"D:/NFP/nfp/kisildalur/node_modules/dayjs/index"' can only be default-imported using the 'allowSyntheticDefaultImports' flag

16 import dayjs from 'dayjs'
          ~~~~~

  node_modules/dayjs/index.d.ts:3:1
    3 export = dayjs;
      ~~~~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'allowSyntheticDefaultImports' flag.

However this will make it work

import * as inbetweener from 'dayjs'
let stupidtypescript:any = inbetweener
const dayjs = stupidtypescript.default
dayjs.extend(LocalizedFormat)
dayjs.extend(relativeTime)
dayjs.extend(updateLocale)
dayjs.locale('is')

lol

@bboydflo this is how you fix that stupid error xD

@iamkun
Copy link
Owner Author

iamkun commented Jan 5, 2021

This change in 1.10.1 add ES6 Module Support, package.json module point to "esm/index.js" (#1298) (f63375d)

really has an unexpected breaking change, and that's of course not what we want.

I am planning to revert this change in the next release 1.10.2 and delete the "module" entry.

Besides, maybe there's no need for Day.js to support ESM bundle, this would only introduce some conflict but no benefits in the tree shaking. A better way might be a separate npm package (like "dayjs-esm") to ship an ESM package.

@zazzaz
Copy link
Contributor

zazzaz commented Jan 6, 2021

1.10.2 has reverted the bc, tested ok on my side

@iamkun
Copy link
Owner Author

iamkun commented Jan 6, 2021

Just released v1.10.2 to revert the esm module entry.

Let leave this breaking change to v2.0.0

@hakimio
Copy link

hakimio commented Jan 7, 2021

@iamkun the issue discussed here is the same I have reported at the end of November: #1242
I imagine it's an issue with TypeScript definitions in the ESM bundle. Maybe you should ask some TS experts for help you with the definitions?
Anyway, ESM bundle with proper tree-shaking is pretty important for everyone who cares about their app production bundle size.

@iamkun
Copy link
Owner Author

iamkun commented Jan 8, 2021

@hakimio yes, that's why I listed the second thing to do is to

Publish a new NPM package, maybe "dayjs-esm" to ship an ESM module with package.json module entry pointed to

@antoniobologna
Copy link

Maybe this is related to all things happening with the latest release of dayjs and using TS. I apologize if I write this within this issue and I'm happy to open a new issue if this does not belong here.

Current Environment

package.json

dependencies: {
 ...
 "dayjs": "^1.10.3",
 "typescript": "^4.1.2",
}

tsconfig.json

{
  "compilerOptions": {
    "target": "es5",
    "lib": [
      "dom",
      "dom.iterable",
      "esnext"
    ],
    "allowJs": true,
    "skipLibCheck": true,
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
    "strict": true,
    "forceConsistentCasingInFileNames": true,
    "noFallthroughCasesInSwitch": true,
    "module": "esnext",
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noEmit": true,
    "sourceMap": true,
    "jsx": "react-jsx"
  },
  "include": [
    "src/**/*"
  ],
  "exclude": [
    "node_modules",
    "build",
    "scripts",
    "acceptance-tests",
    "src/setupTests.ts",
    "src/reportWebVitals.ts",
    "tailwind.config.js"
  ]
}

index.tsx

import dayjs from 'dayjs';

const creationDay = dayjs(createdAt);

Observed behavior

ERROR: TypeError: dayjs__WEBPACK_IMPORTED_MODULE_11___default(...) is not a function

As a workaround I can export namespace dayjs in *.d.ts but then I do not get all of the properties such as fromNow(), ...

Is there a solution to this, or is the next release fixes this?

@alexsorokoletov
Copy link

I'm going to +1 here to say that unfortunately this dayjs update broke the build (while preparing a 1.0 release) and we had to lock the version to 1.9.6 (I saw someone had success with 1.9.7 too).

Thanks for doing better TypeScript support and also for the dayjs package itself, @iamkun.
OSS does not get enough positive support - thanks for doing this for all of us who use the package on many projects and only come to Github to figure out what broke the build.

Thanks!

@benmccann
Copy link

Publish a new NPM package, maybe "dayjs-esm" to ship an ESM module with package.json module entry pointed to. ref #1242 (comment)

For 2.0, I think ESM should be the default. That is the way the whole world is moving. Then we could create dayjs-umd or whatever if it's really necessary to have multiple packages

@JesusTheHun
Copy link
Contributor

Any news on this 2.0 version ?

@always-maap
Copy link
Contributor

Hi, I'm working on a plugin in which add a property to "OptionType". like dayjs(new Date(), { isCool: true }).
I manage to override this with JS but I got stuck in the typing part. I search a bit and apparently add a property with declaration merging is not easy(possible!?) to do.

export interface OptionObj {
  locale?: string,
  format?: string,
  utc?: boolean
}

this is the change that makes things easier. Is there a better solution? I can help with the new version <333

@hollg
Copy link

hollg commented Aug 13, 2021

@always-maap did you find a solution to your problem? I think I'm possibly having the same one (#1605)

@always-maap
Copy link
Contributor

@always-maap did you find a solution to your problem? I think I'm possibly having the same one (#1605)

yes indeed, this is the code example.

https://www.github.com/zoomit-org/Dayjs-Jalali-Plugin/tree/master/index.d.ts

ask me any questions you want, I'm available

@sxzz
Copy link

sxzz commented Nov 14, 2021

@JesusTheHun I'm refactoring dayjs using TypeScript.

There will be the following changes.

  • TypeScript friendly. I will refactor all the code using TypeScript.
  • Support ESM, UMD

Repo: https://github.com/sxzz/dayjs/tree/next

At this very early stage, some features and plugins have not been implemented.

Breaking Change

  • dayjs.locale(preset, object, isLocal) => dayjs.locale(preset, isLocal, object)
  • drop node < 14.17.0
  • private property (starts with $ or _)

@iamkun
Copy link
Owner Author

iamkun commented Mar 24, 2022

v2.0 branch https://github.com/iamkun/dayjs/tree/next

@sxzz sxzz mentioned this issue Apr 19, 2022
Merged
@vhscom
Copy link

vhscom commented Apr 21, 2022

v2.0 branch https://github.com/iamkun/dayjs/tree/next

Could we get a dist-tag in npm for this since there's a branch now please?

@sxzz
Copy link

sxzz commented Apr 21, 2022

@vhscom It is still very early in the process and there may be potential bugs, and unit tests, plugins and locales have not yet been migrated.

@iamkun WDYT? We can release 2.0.0-alpha.0 by now?

@Kavignon
Copy link

Before opening an issue @iamkun, I was wondering about something concerning using DayJS in the context of TS.

If we take a look at the docs for a functionality such as 'from now', we can see the following in the documentation:

var relativeTime = require('dayjs/plugin/relativeTime')
dayjs.extend(relativeTime)

Being new to TS and ES6 modules, it took me a good while to figure out that I had to do the following to make it work:

import dayjs from 'dayjs';
import relativeTime from 'dayjs/plugin/relativeTime';

dayjs.extend(relativeTime);

What would think of creating an issue with the intent of extending the documentation (fantastic work btw) to correct this? And if I'm incorrect and there are some clear indications somewhere for TS, please let me know!

@yohanelly95
Copy link

yohanelly95 commented May 2, 2022

I am trying this in a React project (JS not TS) and it does not work. I get the error TypeError: dayjs__WEBPACK_IMPORTED_MODULE_5___default.a.unix(...).utc is not a function

My code is:
import dayjs from "dayjs";
export const unixToDate = (unix, format = "YYYY-MM-DD") => { return dayjs.unix(unix).utc().format(format); };

@sxzz
Copy link

sxzz commented May 2, 2022

@yohanelly95 Are you using version 2.0.0-alpha.0? If so, please provide the reproduction repo.

@yohanelly95
Copy link

yohanelly95 commented May 2, 2022

nope I am using v1.10.4, I'll try the new alpha version.

@sxzz sxzz unpinned this issue May 2, 2022
@juanky201271
Copy link

@yohanelly95 did you solve this issue, I'm using v1.11.7 and I get the same error... I appreciate any help.

@prewk
Copy link

prewk commented Feb 20, 2023

I'm on [email protected] and don't get the proper types when extending

import dayjs from 'dayjs';
import relativeTime from 'dayjs/plugin/relativeTime';
import updateLocale from 'dayjs/plugin/updateLocale';
dayjs.extend(relativeTime); // <-fine
dayjs.extend(updateLocale); // <-fine

// v- TS2339: Property 'updateLocale' does not exist on type 'DayjsFn'.
dayjs.updateLocale('en', {
  // ...

edit: Funny, when I switch to this kind of import the error shifts:

import * as dayjs from 'dayjs';
import relativeTime from 'dayjs/plugin/relativeTime';
import updateLocale from 'dayjs/plugin/updateLocale';
// v-TS2339: Property 'extend' does not exist on type 'typeof import("/Users/REDACTED/node_modules/dayjs/dist/index")'.
dayjs.extend(relativeTime);
// v-TS2339: Property 'extend' does not exist on type 'typeof import("/Users/REDACTED/node_modules/dayjs/dist/index")'.
dayjs.extend(updateLocale);

dayjs.updateLocale('en', { // <-Suddenly fine
  // ...

edit2: Which brings us to our final working solution!

import * as dayjs from 'dayjs';
import relativeTime from 'dayjs/plugin/relativeTime';
import updateLocale from 'dayjs/plugin/updateLocale';
dayjs.default.extend(relativeTime);
dayjs.default.extend(updateLocale);

dayjs.updateLocale('en', {
  // ...

edit3: Wasn't a solution after all, only my IDE (WebStorm) understood what I was doing but the Angular/typescript service did not agree: Error: export 'updateLocale' (imported as 'dayjs') was not found in 'dayjs' (possible exports: default)

@long76
Copy link

long76 commented Apr 4, 2023

@karlhorky
Copy link

karlhorky commented Aug 27, 2023

I'm on [email protected] and don't get the proper types when extending

Maybe related: it seems like there are some problems with the TS types / packaging for [email protected]:

Are The Types Wrong?

🎭 Masquerading as CJS

Import resolved to a CommonJS type declaration file, but an ESM JavaScript file.

🐛
Used fallback condition

Import resolved to types through a conditional package.json export, but only after failing to resolve through an earlier condition. This behavior is a TypeScript bug. It may misrepresent the runtime behavior of this import and should not be relied upon.

Screenshot 2023-08-27 at 13 24 04

@karlhorky
Copy link

Publint is also reporting 3 errors and 1 warning:

The types is not exported. Consider adding pkg.exports["."].import.types to be compatible with TypeScript's "moduleResolution": "bundler" compiler option. Note that you cannot use "./dist/index.d.ts" because it has a mismatching format. Instead, you can duplicate the file and use the .mts extension, e.g. pkg.exports["."].import.types: "./dist/index.d.mts" (More info)

Should be the first in the object as required by TypeScript. (More info)

Screenshot 2023-08-27 at 13 29 31

EDM115 added a commit to data-fair/processings that referenced this issue Mar 13, 2024
@bombillazo
Copy link

Hey, is this milestone being pursued, or has Dayjs entered maintenance mode? There are tons of PRs. We are using Deno and this ESM issue affects our use of Dayjs.

albanm added a commit to data-fair/processings that referenced this issue Jun 17, 2024
* fix: package-lock.json

* feat: add permissions test

+ move start servers into index.js

* fix: re-added missing functions/logic
- added back things that went missing during the migration
- the docker-compose logs are now saved
- reordered variables, imports, ...
- specify the source of $fetch calls
- fixed the default 8px margin, see https://www.joshwcomeau.com/css/custom-css-reset/ for more CSS hacks
- tried to fix the emits, subject to change
- VJSF migration not 100% done yet
- probably fixed some ws bugs
- moved sources/ to ui/assets/sources/
- removed every require left
- ui/assets/format.js seems unused
- ui build now deletes the right folder
- fixed the middleware
- fixed some event bus oversights
- store update: added error(), changed the login (! this can be the source of some errors)

* fix: tests

+ bug : /api/v1/runs never return 403 error
+ bug : processings tests doesn't work

* fix: permission reQSession -> req

+ add logs

* fix: temporarily disabled the middleware (/admin/plugins error)

* fix: test 'create a new processing'

* fix: finished the migration ?
- the middleware now works
- fixed some migration issues
- uses navigateTo instead of router.push
- the error layout is now in ui/
- properly set the HEAD metadata
- moved all filters in 1 file
- _id.vue is now [id].vue
- properly instantiate the store

* fix: test config dir

* Merge nuxt3 into livrables

* fix: css

* feat: use @df/testSpies

* fix: config dir

* fix: test SIGTERM kill and stop worker at the end

* fix: remove hooks in worker server

* chore: remove eslint config from package.json

* fix: removed the middleware, better requests body, better error layout, some fixes in the store

* fix: package-lock.json

* feat: notification event hook -> test:spy

* fix: vuetify styles are now properly applied

* fix: removed @data-fair/sd-vue

* feat: remove ./test

* fix: eslint config

- fix some eslint errors
- create a gitignore for ui
- better nuxt.config.js

* fix: better card styles

* fix: uses the compat function from VJSF

* fix: ui Dockerfile

* fix: mongo url in prod

- When testing the API Docker image, connection to the database was not working.

* fix: worker Dockerfile

* fix: worker Dockerfile

* fix: small UI tweaks + fixed saving the state of a plugin (public or not + define access)

* feat: clean ui config

* fix: the forms are displayed
- fixed the vjsf usage
- added the missing @koumoul/vjsf-markdown
- simplified the npm run i command
- when you create a processing, the create button is disabled (spam-clicking it would create a ton of them) and displays a progress bar
- /admin now redirects to /admin/plugins
- probably fixed the v2compat usage
- the vjsf form is now compact by default
- the 'show all processings' button now have a way better style

* feat: add ts-config

* fix: no .cjs, the breadcrumbs now displays

* fix: better runs handling

- Co-authored-by: BatLeDev

* fix: the notifications card now shows properly on dark theme

* fix: the breadcrumbs style is now properly applied

* feat: better Vuetify instantiation
- removed the manual css import from jsdelivr
- changed the way the theme is accessed/edited on the store
- you can now switch theme without triggering a reload
- added vuetify, vite-plugin-vuetify
- removed vuetify-nuxt-module
- separated the vuetify instantiation from the session one in ui/plugins
- the locale messages should be now properly interpreted

* chore: added contributing guidelines, edited the readme, added some comments for non-trivial code and made the ui/sources files ESM-compatible

* fix: the error page now works fine

* chore: Small mistake in Docker instructions

* fix: better menus
- the menus now appears when the window is smaller, with a better color
- fixed a bug where the icons would be dull
- fixed all #activator templates
- simplified icons in most v-btn
- added the Show all processings in the small menu

* fix: observer and tmpDir config

* fix: config schema

* fix: pass breadcrumbs to parent, better processing card styles, docker compose's data-fair config changed

* feat: use data-fair/lib session and vuetify

* fix: publicUrl

* fix: small UI tweaks + vjsf 3.0.0-beta.5

* fix: main.scss

* fix: some types

* feat: add schema for processing

* fix: processings run action should be triggered + vjsf update

* feat: add typescript annotation

* fix: runs actually works
- fixed an issue with the api
- added a progressbar when the processing config is edited. so you know why you can't (yet) run it
- the webhook link is in code tags
- running and deleting a processing have a progressbar as well and disables their respective buttons
- fixed the Run processing button not emitting its trigger
- fixed the duration method
- the timestamps in runs are correctly displayed (sticked to the right)
- removed notify from the websocket

* chore: dev navbar

* fix: errors correctly redirect to the error page + user check in processings

* fix: add some types in api

* feat: add type for permission

* fix: some types errors

* fix: correctly passes values to $fetch and better plugins page
- update icon if the plugin can be updated
- better display of the version
- remove installed plugins from the available plugins list
- sorts plugins by alphabetical order

* fix: don't display an empty space under the plugins if there's no description

* fix: better plugins deletion
- don't prompt to run a processing with a deleted plugin
- show a confirmation prompt before deleting a plugin

* fix: processing menu now appears correctly on small screens + bump dayjs from 1.11.10 to 2.0.0-alpha.4
- see iamkun/dayjs#1281

* fix: websocket does not send data

* fix: loading bar and apiKey

* fix: better v-icon, better design on a processing's runs list, fixed build error and display the navbar only if we're not in an iframe

* fix: the loading circle on processing's page is have a correct padding and better text

* fix: task never stop

* feat: show a status icon on each run step, creating a plugin now allows typing its name

* fix: kill task with ui

* feat: plugin input is clearable, display the number of installed/available plugins

* fix: test failed

* fix: worker dependencies version

* feat: search processings
- fixed 'mobile' menu for creating a processing
- display in the processings list if one have been/is being killed

* fix: consistent style on search elements + fixed the processing search looking like a D when filled

* fix: type error

* fix: some types

* feat: display processings by run status

* feat: plugin & processings search doesn't require to select elements anymore
- processing's search & status works together
- fixed an issue with vjsf validate

* feat: add custom plugin name config

+ fix types in plugin and plugins-registry

* chore: clean plugin router

* fix: add types on create and get processings

* fix: patch processing

* chore: add comments is processings router

* fix: validate the form, debounce the input

* fix: avoid exceeding call stack

* fix: run processing with delay

+ add JSDoc ts annotation
+ add shared to Dockerfile

* feat: API documentation

* fix: notify now works again

* feat: complete plugins & limits doc

* style: add summary on api doc

* feat: complete processings part of API doc

* fix: update version show when the disTag is different

+ fix axios moderate dependency warning
+ fix name of plugin in plugin page

* fix: re-add privateDaraFairUrl & privateDirectoryUrl

* fix: dataFairUrl & directoryUrl

* fix: drop next run when scheduling type is 'trigger'

+ move createNext function to shared
+ add ts annotation

* fix: add ts anotation

+ add 404 error when plugin not found
+ merge master in nuxt3

* feat: sort processings by planned, loading indicator when installing a plugin

* fix: avoid concurrent patch

* fix: end task properly

* fix: avoid concurrent patch (actually)

* feat: sort processings by plugin used (compatible with custom names and version agnostic)

* chore : rename reqSession by sessionState

+ add department support on sd

* chore: nuxt update to v3.11
- also updated all UI dependencies
- uses the proper Nuxt3 components naming convention
- uses the new Client Component feature from Nuxt 3.11.0
- deleted unused components
- stops explicitely importing component and instead rely on Nuxt's Components dynamic import

* fix: readd secondaryHost

* fix: better processings sort by plugin
- now also works when a plugin have been deleted
- stops renaming the customName (made at first to remove the version but this also would remove everything in parenthesis on custom names)

* chore: add better types for mongodb

* fix: mongo db starting error

* chore: added types annotations to all components

* feat: add a query param into plugin-registry

This param 'showAll' allow to get all plugins and their versions (distTag)

* fix: req.param -> req.query

+ better tests for plugin-registry

* feat: implement b50459f on UI's side

* fix: test permissions, admin1 doesn't exist

* chore: add better types in worker

* fix: processing's config timezone now works as expected
- killing a run now works instantly
- ui's build noww works again
- the show all option on plugins page have a more logical placement
- processing's config now validates properly again

* fix: test build images

* fix: better patch with vjsf beta 9

* feat: added skeleton loaders
- also fixed the Notifications snackbar

* fix: data folder on build docker images

* fix: runs correctly on build + notifications fix
- added NODE_ENV as an ARG so we can provide it on build
- removed USER node, as it won't work with volumes (created with root, containers then got no access)
- the notifications component is now readable on mobile
- fixed the skeleton loader having the wrong check on processings page

* chore: removed pinia leftovers

* feat: refacto of plugin.vue

Visual Changes:
- Refined the styling in index.vue for processings: the sidebars are now more compact.
- Enhanced the appearance of search bars in both processings and plugins views to be more square-shaped, similar to the dataset page.
- Improved the display of Skeleton loaders in plugins.vue.

Functional Changes:
- Enabled the ability to install multiple plugins simultaneously. (Very convenient 😍)
- Enhanced the v-menu display for deletion

Pending Fixes and Enhancements:
- Fix the issue with the 'No' button not dismissing the v-menu.
- Add try-catch blocks for both installation and deletion to handle errors gracefully.
- Implement notifications in the catch blocks.

* fix: hide delete plugin menu, mobile button is fixed and the owner avatar shows

* chore: added NPM_HTTPS_PROXY env var related stuff from master

* fix: readd v-iframe plugin and add better v-card style

* chore: change plugin filter by composable date-format

* chore: text update

* feat: get processings list with facets (statuses) and filter by statuses

* fix: readded skeleton loaders on processings list, removed the progress bar, fixed the patch

* fix: correct height in data-fair iframe

* feat: add facets and filters on plugins in processings endpoint

* fix: sort filters

* feat: filters displays in the URL

* Added new params to the API doc

* chore: small menu issue

* feat: better aggregation in plugin endpoint for facets

* fix: better minimum iframe height and passes url values to the mobile menu

* fix: better skeleton loader display on light theme

* feat: add facets count nb processings per plugins in plugin endpoint

* feat: can't uninstall a plugin if it's used by > 0 processings, displays that info too

* chore: update the API docs (facets in GET /plugins)

* fix: permissions on department

* chore: better description in PrivateAccess

* fix: renamed showAll to showAllPlugins on the plugins page to avoid conflict with showAll on processings page

* chore: add mongodb indexes

* chore: make tests work

* chore: configure husky

* fix: types of plugins-registry.js

* chore: use jsdoc linter + small implementation details

* fix: wrong root routing

* refactor: work on many small things

* fix: missing prefix path in tests

* chore: work on CI

* chore: default config values

* chore: docker on UI dockerfile

* chore: work on dockerfiles

* chore: some dependency management

* chore: some dependency management

* chore: some dependency management

* chore: some dependency management

* chore: some dependency management

* fix: broken use of tmp-promise

* fix: some regression due to dependency upgrades

* chore: some dependency management

* chore: some dependency management

* chore: some dependency management

* chore: better error display

* fix: missing error management in UI

* chore: better run requests in sequence

* chore: send notif to parent iframe

* fix: wrong var name

* fix: error when access file is missing

* fix: some reactivity problems

* fix: wrong data dir in dev env

* chore: various small changes

* fix: a errors with session and navigation

* fix: missing dep

* fix: missing dep

* fix: prevent null reference error

* chore: use privateNotifyUrl config variable

* fix: some vjsf error management problems

* fix: remove additional properties in config

* fix: regression in using secretKeys

* chore: remove file that should be ignored

* chore: ignore local configuration files

* fix: broken unset logic

* fix: configuring iframe-resizer doesn't work as a nuxt plugin

* fix: try another way to configure iframe-resizer

* fix: try another way to configure iframe-resizer

* fix: try another way to configure iframe-resizer

* fix: problem in vjsf wait for correct form validity

* fix: missing customName in older plugins

* fix: pull fixes from vjsf

* fix: pull fixes from vjsf

* fix: labels of buttons on permissions list

* fix: broken contrib access

* fix: missing python to install native deps

* chore: small forms improvements

* chore: small forms improvements

* chore: small forms improvements

* 2.0.0

* chore: temporarily activate quality checks on commit to test workflow

* chore: add build-types script to CI

* Revert "chore: temporarily activate quality checks on commit to test workflow"

This reverts commit c3febff.

* 2.0.1

* fix: npm config cannot run inside a workspace

* 2.0.2

* fix: broken us of reactive search params

* refactor: work on reactivity of processings page

* chore: adapt to reactive search params new composables

* chore: small changes

* fix: disable autocomplet of password fields

* fix: missing config for tmp dir

* fix: broken breadcrumb

* chore: use axios retry for more resilient http requests

* feat: add tippecanoe to worker image

* fix: some problems in debug mode and error management

* 2.0.3

* fix: prevent null reference exception

* 2.0.4

* fix: axios error interceptor incompatible with axios retry

* fix: axios error interceptor incompatible with axios retry

* fix: missing axios-retry in worker image

* 2.0.5

* fix: wrong mails transport config structure

* fix: upgrade vjsf

* fix: upgrade vjsf

* fix: broken edition and application of timezones

* fix: upgrade vjsf

* fix: missing native deps in worker image

* refactor: use locks from @data-fair/lib

---------

Co-authored-by: BatLeDev <[email protected]>
Co-authored-by: Alban Mouton <[email protected]>
@lzxb
Copy link

lzxb commented Nov 26, 2024

I am using Gez to build a pure ESM application and now I am encountering a problem.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking Change discussion Further discussion help wanted Extra attention is needed 🚨 High Priority
Projects
None yet
Development

No branches or pull requests