Bot releases are visible (Hide)
Published by github-actions[bot] 9 months ago
30e4c25
Thanks @DuCanhGH! - chore(peerDeps): bump minimum supported TypeScript and Node.js version
# Change to your preferred way of updating Node.js
nvm use 18
# Change to your package manager
npm i -D typescript@5
defdd5a
Thanks @DuCanhGH! - refactor(js): migrate to ESM-only
Serwist is now an ESM-only project.
This was done because our tooling around supporting CJS had always been crappy: it was slow, had no way of supporting emitting .d.cts
(we used to copy .d.ts
to .d.cts
), and was too error-prone (there were various issues of our builds crashing due to an ESM-only package slipping in).
If you already use ESM, there's nothing to be done. Great! Otherwise, to migrate:
Migrate to ESM if possible.
Otherwise, use dynamic imports. For example, to migrate to the new @serwist/next
:
// @ts-check
const withSerwist = require("@serwist/next").default({
cacheOnFrontEndNav: true,
swSrc: "app/sw.ts",
swDest: "public/sw.js",
});
/** @type {import("next").NextConfig} */
const nextConfig = {
reactStrictMode: true,
};
module.exports = withSerwist(nextConfig);
// @ts-check
/** @type {import("next").NextConfig} */
const nextConfig = {
reactStrictMode: true,
};
module.exports = async () => {
const withSerwist = (await import("@serwist/next")).default({
cacheOnFrontEndNav: true,
swSrc: "app/sw.ts",
swDest: "public/sw.js",
});
return withSerwist(nextConfig);
};
I know that most of our current userbase use Next.js, which still suggests using a CJS config file, so I am really sorry for the trouble I have caused for you :( However, what needs to be done has to be done. It was time to migrate and get rid of old, legacy things.
Published by github-actions[bot] 9 months ago
30e4c25
Thanks @DuCanhGH! - chore(peerDeps): bump minimum supported TypeScript and Node.js version
# Change to your preferred way of updating Node.js
nvm use 18
# Change to your package manager
npm i -D typescript@5
defdd5a
Thanks @DuCanhGH! - refactor(js): migrate to ESM-only
Serwist is now an ESM-only project.
This was done because our tooling around supporting CJS had always been crappy: it was slow, had no way of supporting emitting .d.cts
(we used to copy .d.ts
to .d.cts
), and was too error-prone (there were various issues of our builds crashing due to an ESM-only package slipping in).
If you already use ESM, there's nothing to be done. Great! Otherwise, to migrate:
Migrate to ESM if possible.
Otherwise, use dynamic imports. For example, to migrate to the new @serwist/next
:
// @ts-check
const withSerwist = require("@serwist/next").default({
cacheOnFrontEndNav: true,
swSrc: "app/sw.ts",
swDest: "public/sw.js",
});
/** @type {import("next").NextConfig} */
const nextConfig = {
reactStrictMode: true,
};
module.exports = withSerwist(nextConfig);
// @ts-check
/** @type {import("next").NextConfig} */
const nextConfig = {
reactStrictMode: true,
};
module.exports = async () => {
const withSerwist = (await import("@serwist/next")).default({
cacheOnFrontEndNav: true,
swSrc: "app/sw.ts",
swDest: "public/sw.js",
});
return withSerwist(nextConfig);
};
I know that most of our current userbase use Next.js, which still suggests using a CJS config file, so I am really sorry for the trouble I have caused for you :( However, what needs to be done has to be done. It was time to migrate and get rid of old, legacy things.
defdd5a
, 30e4c25
, defdd5a
]:
Published by github-actions[bot] 9 months ago
30e4c25
Thanks @DuCanhGH! - chore(peerDeps): bump minimum supported TypeScript and Node.js version
# Change to your preferred way of updating Node.js
nvm use 18
# Change to your package manager
npm i -D typescript@5
defdd5a
Thanks @DuCanhGH! - refactor(js): migrate to ESM-only
Serwist is now an ESM-only project.
This was done because our tooling around supporting CJS had always been crappy: it was slow, had no way of supporting emitting .d.cts
(we used to copy .d.ts
to .d.cts
), and was too error-prone (there were various issues of our builds crashing due to an ESM-only package slipping in).
If you already use ESM, there's nothing to be done. Great! Otherwise, to migrate:
Migrate to ESM if possible.
Otherwise, use dynamic imports. For example, to migrate to the new @serwist/next
:
// @ts-check
const withSerwist = require("@serwist/next").default({
cacheOnFrontEndNav: true,
swSrc: "app/sw.ts",
swDest: "public/sw.js",
});
/** @type {import("next").NextConfig} */
const nextConfig = {
reactStrictMode: true,
};
module.exports = withSerwist(nextConfig);
// @ts-check
/** @type {import("next").NextConfig} */
const nextConfig = {
reactStrictMode: true,
};
module.exports = async () => {
const withSerwist = (await import("@serwist/next")).default({
cacheOnFrontEndNav: true,
swSrc: "app/sw.ts",
swDest: "public/sw.js",
});
return withSerwist(nextConfig);
};
I know that most of our current userbase use Next.js, which still suggests using a CJS config file, so I am really sorry for the trouble I have caused for you :( However, what needs to be done has to be done. It was time to migrate and get rid of old, legacy things.
30e4c25
, defdd5a
]:
Published by github-actions[bot] 9 months ago
defdd5a
Thanks @DuCanhGH! - refactor(validators): migrate to Zod
We now use Zod instead of AJV.
This allows us to further validate the values, as AJV didn't support validating functions, classes, and more.
Usually, you don't need to do anything. However, if you manipulate the log/error message to do something wicked, you may need to adapt to the new format:
Received an invalid Serwist configuration: {
"_errors": [
"Received unrecognized keys: someInvalidKey"
],
"additionalPrecacheEntries": {
"_errors": [
"Received invalid type: expected array, received string."
]
}
}
30e4c25
Thanks @DuCanhGH! - chore(peerDeps): bump minimum supported TypeScript and Node.js version
# Change to your preferred way of updating Node.js
nvm use 18
# Change to your package manager
npm i -D typescript@5
defdd5a
Thanks @DuCanhGH! - refactor(js): migrate to ESM-only
Serwist is now an ESM-only project.
This was done because our tooling around supporting CJS had always been crappy: it was slow, had no way of supporting emitting .d.cts
(we used to copy .d.ts
to .d.cts
), and was too error-prone (there were various issues of our builds crashing due to an ESM-only package slipping in).
If you already use ESM, there's nothing to be done. Great! Otherwise, to migrate:
Migrate to ESM if possible.
Otherwise, use dynamic imports. For example, to migrate to the new @serwist/next
:
// @ts-check
const withSerwist = require("@serwist/next").default({
cacheOnFrontEndNav: true,
swSrc: "app/sw.ts",
swDest: "public/sw.js",
});
/** @type {import("next").NextConfig} */
const nextConfig = {
reactStrictMode: true,
};
module.exports = withSerwist(nextConfig);
// @ts-check
/** @type {import("next").NextConfig} */
const nextConfig = {
reactStrictMode: true,
};
module.exports = async () => {
const withSerwist = (await import("@serwist/next")).default({
cacheOnFrontEndNav: true,
swSrc: "app/sw.ts",
swDest: "public/sw.js",
});
return withSerwist(nextConfig);
};
I know that most of our current userbase use Next.js, which still suggests using a CJS config file, so I am really sorry for the trouble I have caused for you :( However, what needs to be done has to be done. It was time to migrate and get rid of old, legacy things.
30e4c25
, defdd5a
]:
Published by github-actions[bot] 9 months ago
defdd5a
Thanks @DuCanhGH! - refactor(js): migrate to ESM-only
Serwist is now an ESM-only project.
This was done because our tooling around supporting CJS had always been crappy: it was slow, had no way of supporting emitting .d.cts
(we used to copy .d.ts
to .d.cts
), and was too error-prone (there were various issues of our builds crashing due to an ESM-only package slipping in).
If you already use ESM, there's nothing to be done. Great! Otherwise, to migrate:
Migrate to ESM if possible.
Otherwise, use dynamic imports. For example, to migrate to the new @serwist/next
:
// @ts-check
const withSerwist = require("@serwist/next").default({
cacheOnFrontEndNav: true,
swSrc: "app/sw.ts",
swDest: "public/sw.js",
});
/** @type {import("next").NextConfig} */
const nextConfig = {
reactStrictMode: true,
};
module.exports = withSerwist(nextConfig);
// @ts-check
/** @type {import("next").NextConfig} */
const nextConfig = {
reactStrictMode: true,
};
module.exports = async () => {
const withSerwist = (await import("@serwist/next")).default({
cacheOnFrontEndNav: true,
swSrc: "app/sw.ts",
swDest: "public/sw.js",
});
return withSerwist(nextConfig);
};
I know that most of our current userbase use Next.js, which still suggests using a CJS config file, so I am really sorry for the trouble I have caused for you :( However, what needs to be done has to be done. It was time to migrate and get rid of old, legacy things.
30e4c25
, defdd5a
]:
Published by github-actions[bot] 9 months ago
defdd5a
Thanks @DuCanhGH! - refactor(js): migrate to ESM-only
Serwist is now an ESM-only project.
This was done because our tooling around supporting CJS had always been crappy: it was slow, had no way of supporting emitting .d.cts
(we used to copy .d.ts
to .d.cts
), and was too error-prone (there were various issues of our builds crashing due to an ESM-only package slipping in).
If you already use ESM, there's nothing to be done. Great! Otherwise, to migrate:
Migrate to ESM if possible.
Otherwise, use dynamic imports. For example, to migrate to the new @serwist/next
:
// @ts-check
const withSerwist = require("@serwist/next").default({
cacheOnFrontEndNav: true,
swSrc: "app/sw.ts",
swDest: "public/sw.js",
});
/** @type {import("next").NextConfig} */
const nextConfig = {
reactStrictMode: true,
};
module.exports = withSerwist(nextConfig);
// @ts-check
/** @type {import("next").NextConfig} */
const nextConfig = {
reactStrictMode: true,
};
module.exports = async () => {
const withSerwist = (await import("@serwist/next")).default({
cacheOnFrontEndNav: true,
swSrc: "app/sw.ts",
swDest: "public/sw.js",
});
return withSerwist(nextConfig);
};
I know that most of our current userbase use Next.js, which still suggests using a CJS config file, so I am really sorry for the trouble I have caused for you :( However, what needs to be done has to be done. It was time to migrate and get rid of old, legacy things.
30e4c25
, defdd5a
]:
Published by github-actions[bot] 9 months ago
Published by github-actions[bot] 9 months ago
Published by github-actions[bot] 9 months ago
Published by github-actions[bot] 9 months ago
Published by github-actions[bot] 9 months ago
Published by github-actions[bot] 9 months ago
Published by github-actions[bot] 9 months ago
Published by github-actions[bot] 9 months ago
Published by github-actions[bot] 9 months ago
Published by github-actions[bot] 9 months ago
Published by github-actions[bot] 9 months ago
#56 905e827
Thanks @DuCanhGH! - fix(next): fixed invalid precache manifest being generated when basePath
is set
modifyURLPrefix
not being matched when basePath
was set, since the URL was actually "${basePath}/_next/../public/**/*".manifestTransforms
instead of modifyURLPrefix
.Updated dependencies []:
Published by github-actions[bot] 9 months ago
Published by github-actions[bot] 9 months ago
Published by github-actions[bot] 9 months ago