mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 00:39:49 +00:00
Set lib & target to node 14, remove usage of Array.at
This commit is contained in:
parent
4d327803cd
commit
b3ffb28aa9
@ -1,6 +1,6 @@
|
|||||||
import type { SchemaUID } from '@strapi/strapi/lib/types/utils';
|
import type { SchemaUID } from '@strapi/strapi/lib/types/utils';
|
||||||
|
|
||||||
import { get } from 'lodash/fp';
|
import { get, last } from 'lodash/fp';
|
||||||
import { Writable } from 'stream';
|
import { Writable } from 'stream';
|
||||||
|
|
||||||
import type { IEntity } from '../../../../../../types';
|
import type { IEntity } from '../../../../../../types';
|
||||||
@ -72,7 +72,7 @@ const createEntitiesWriteStream = (options: IEntitiesRestoreStreamOptions) => {
|
|||||||
// For each difference found on an ID attribute,
|
// For each difference found on an ID attribute,
|
||||||
// update the mapping the table accordingly
|
// update the mapping the table accordingly
|
||||||
diffs.forEach((diff) => {
|
diffs.forEach((diff) => {
|
||||||
if (diff.kind === 'modified' && diff.path.at(-1) === 'id') {
|
if (diff.kind === 'modified' && last(diff.path) === 'id') {
|
||||||
const target = resolveType(diff.path);
|
const target = resolveType(diff.path);
|
||||||
|
|
||||||
// If no type is found for the given path, then ignore the diff
|
// If no type is found for the given path, then ignore the diff
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
"extends": "@tsconfig/node16/tsconfig.json",
|
"extends": "@tsconfig/node16/tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"lib": ["ESNEXT"],
|
"lib": ["ES2020"],
|
||||||
|
"target": "ES2020",
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"outDir": "lib",
|
"outDir": "lib",
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user