Skip to content

Commit

Permalink
Merge pull request #38 from tiktok/chao/fix-vulnerability
Browse files Browse the repository at this point in the history
fix: rename test pacakges
  • Loading branch information
octogonz authored Jan 6, 2025
2 parents 68a2760 + 1bfd94c commit ab5c99d
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 27 deletions.
14 changes: 7 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions tests/pnpm-sync-api-test/src/test/pnpmSyncCopy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ describe('pnpm-sync-api copy test', () => {
});

const targetFolderPath1 =
'../../../../node_modules/.pnpm/[email protected]/node_modules/api-demo-sample-lib1';
'../../../../node_modules/.pnpm/[email protected]/node_modules/@tiktok-service/api-demo-sample-lib1';
const targetFolderPath2 =
'../../../../node_modules/.pnpm/[email protected]/node_modules/api-demo-sample-lib2';
'../../../../node_modules/.pnpm/[email protected]/node_modules/@tiktok-service/api-demo-sample-lib2';

// make sure .pnpm-sync.json exists
expect(fs.existsSync(pnpmSyncJsonPath1)).toBe(true);
Expand Down Expand Up @@ -79,7 +79,7 @@ describe('pnpm-sync-api copy test', () => {
const pnpmSyncJsonPath = `${pnpmSyncJsonFolder}/.pnpm-sync.json`;

const targetFolderPath =
'../../../../node_modules/.pnpm/[email protected]/node_modules/api-demo-sample-lib1';
'../../../../node_modules/.pnpm/[email protected]/node_modules/@tiktok-service/api-demo-sample-lib1';
const pnpmSyncJsonFile = JSON.parse(fs.readFileSync(pnpmSyncJsonPath).toString());

// set a outdated version
Expand Down Expand Up @@ -159,7 +159,7 @@ describe('pnpm-sync-api copy test', () => {
const pnpmSyncJsonPath = `${pnpmSyncJsonFolder}/.pnpm-sync.json`;

const targetFolderPath =
'../../../../node_modules/.pnpm/[email protected]/node_modules/api-demo-sample-lib2';
'../../../../node_modules/.pnpm/[email protected]/node_modules/@tiktok-service/api-demo-sample-lib2';

const destinationPath = path.resolve(pnpmSyncJsonFolder, targetFolderPath);
const sourcePath = '../test-fixtures/sample-lib2';
Expand Down Expand Up @@ -234,7 +234,7 @@ describe('pnpm-sync-api copy test', () => {
const pnpmSyncJsonPath = `${pnpmSyncJsonFolder}/.pnpm-sync.json`;

const targetFolderPath =
'../../../../node_modules/.pnpm/[email protected]/node_modules/api-demo-sample-lib2';
'../../../../node_modules/.pnpm/[email protected]/node_modules/@tiktok-service/api-demo-sample-lib2';

const destinationPath = path.resolve(pnpmSyncJsonFolder, targetFolderPath);

Expand Down
16 changes: 8 additions & 8 deletions tests/pnpm-sync-api-test/src/test/pnpmSyncPrepare.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ describe('pnpm-sync-api prepare test', () => {
targetFolders: [
{
folderPath:
'../../../../node_modules/.pnpm/[email protected]/node_modules/api-demo-sample-lib1'
'../../../../node_modules/.pnpm/[email protected]/node_modules/@tiktok-service/api-demo-sample-lib1'
}
]
}
Expand All @@ -116,7 +116,7 @@ describe('pnpm-sync-api prepare test', () => {
targetFolders: [
{
folderPath:
'../../../../node_modules/.pnpm/[email protected]/node_modules/api-demo-sample-lib2'
'../../../../node_modules/.pnpm/[email protected]/node_modules/@tiktok-service/api-demo-sample-lib2'
}
]
}
Expand Down Expand Up @@ -195,7 +195,7 @@ describe('pnpm-sync-api prepare test', () => {
targetFolders: [
{
folderPath:
'../../../../node_modules/.pnpm/[email protected]/node_modules/api-demo-sample-lib1'
'../../../../node_modules/.pnpm/[email protected]/node_modules/@tiktok-service/api-demo-sample-lib1'
}
]
}
Expand All @@ -221,17 +221,17 @@ describe('pnpm-sync-api prepare test', () => {
targetFolders: [
{
folderPath:
'../../../../node_modules/.pnpm/[email protected]/node_modules/api-demo-sample-lib1',
'../../../../node_modules/.pnpm/[email protected]/node_modules/@tiktok-service/api-demo-sample-lib1',
lockfileId: 'identifier1'
},
{
folderPath:
'../../../../node_modules/.pnpm/[email protected]/node_modules/api-demo-sample-lib2',
'../../../../node_modules/.pnpm/[email protected]/node_modules/@tiktok-service/api-demo-sample-lib2',
lockfileId: 'identifier1'
},
{
folderPath:
'../../../../node_modules/.pnpm/[email protected]/node_modules/api-demo-sample-lib3',
'../../../../node_modules/.pnpm/[email protected]/node_modules/@tiktok-service/api-demo-sample-lib3',
lockfileId: 'identifier2'
}
]
Expand Down Expand Up @@ -262,12 +262,12 @@ describe('pnpm-sync-api prepare test', () => {
targetFolders: [
{
folderPath:
'../../../../node_modules/.pnpm/[email protected]/node_modules/api-demo-sample-lib3',
'../../../../node_modules/.pnpm/[email protected]/node_modules/@tiktok-service/api-demo-sample-lib3',
lockfileId: 'identifier2'
},
{
folderPath:
'../../../../node_modules/.pnpm/[email protected]/node_modules/api-demo-sample-lib1',
'../../../../node_modules/.pnpm/[email protected]/node_modules/@tiktok-service/api-demo-sample-lib1',
lockfileId: 'identifier1'
}
]
Expand Down
6 changes: 3 additions & 3 deletions tests/test-fixtures/sample-app1/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "api-demo-sample-app1",
"name": "@tiktok-service/api-demo-sample-app1",
"version": "1.0.0",
"description": "",
"main": "index.js",
Expand All @@ -10,11 +10,11 @@
"author": "",
"license": "MIT",
"dependencies": {
"api-demo-sample-lib1": "workspace:*",
"@tiktok-service/api-demo-sample-lib1": "workspace:*",
"react": "~17.0.0"
},
"dependenciesMeta": {
"api-demo-sample-lib1": {
"@tiktok-service/api-demo-sample-lib1": {
"injected": true
}
},
Expand Down
6 changes: 3 additions & 3 deletions tests/test-fixtures/sample-lib1/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "api-demo-sample-lib1",
"name": "@tiktok-service/api-demo-sample-lib1",
"version": "1.0.0",
"description": "",
"main": "dist/index.js",
Expand All @@ -15,10 +15,10 @@
"react": "17 || 18"
},
"dependencies": {
"api-demo-sample-lib2": "workspace: *"
"@tiktok-service/api-demo-sample-lib2": "workspace: *"
},
"dependenciesMeta": {
"api-demo-sample-lib2": {
"@tiktok-service/api-demo-sample-lib2": {
"injected": true
}
},
Expand Down
2 changes: 1 addition & 1 deletion tests/test-fixtures/sample-lib2/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "api-demo-sample-lib2",
"name": "@tiktok-service/api-demo-sample-lib2",
"version": "1.0.0",
"description": "Test description value",
"main": "dist/index.js",
Expand Down

0 comments on commit ab5c99d

Please sign in to comment.